本文整理汇总了C#中Sim.ChangeCommodityInteractionMap方法的典型用法代码示例。如果您正苦于以下问题:C# Sim.ChangeCommodityInteractionMap方法的具体用法?C# Sim.ChangeCommodityInteractionMap怎么用?C# Sim.ChangeCommodityInteractionMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim.ChangeCommodityInteractionMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Perform
public static Sim Perform(Sim sim, bool fadeOut)
{
if (sim == null) return null;
try
{
SimDescription simDesc = sim.SimDescription;
if (Simulator.GetProxy(sim.ObjectId) == null)
{
if (simDesc != null)
{
sim.Destroy();
}
//sim.mSimDescription = null;
return null;
}
if (simDesc == null)
{
sim.mSimDescription = new SimDescription();
sim.Destroy();
return null;
}
if (sim.LotHome != null)
{
simDesc.IsZombie = false;
if (simDesc.CreatedSim != sim)
{
sim.Destroy();
simDesc.CreatedSim = null;
return null;
}
else
{
Bed myBed = null;
BedData myBedData = null;
foreach (Bed bed in sim.LotHome.GetObjects<Bed>())
{
myBedData = bed.GetPartOwnedBy(sim);
if (myBedData != null)
{
myBed = bed;
break;
}
}
ResetPosture(sim);
if (simDesc.TraitManager == null)
{
simDesc.mTraitManager = new TraitManager();
}
try
{
simDesc.Fixup();
Corrections.CleanupBrokenSkills(simDesc, null);
ResetCareer(simDesc);
simDesc.ClearSpecialFlags();
if (simDesc.Pregnancy == null)
{
try
{
if (simDesc.mMaternityOutfits == null)
{
simDesc.mMaternityOutfits = new OutfitCategoryMap();
}
simDesc.SetPregnancy(0, false);
simDesc.ClearMaternityOutfits();
}
catch (Exception e)
{
Common.Exception(sim, null, "Pregnancy", e);
}
}
if (sim.CurrentCommodityInteractionMap == null)
{
try
{
LotManager.PlaceObjectOnLot(sim, sim.ObjectId);
if (sim.CurrentCommodityInteractionMap == null)
{
sim.ChangeCommodityInteractionMap(sim.LotHome.Map);
}
}
//.........这里部分代码省略.........