本文整理汇总了C#中SimDescription.SetDeathStyle方法的典型用法代码示例。如果您正苦于以下问题:C# SimDescription.SetDeathStyle方法的具体用法?C# SimDescription.SetDeathStyle怎么用?C# SimDescription.SetDeathStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimDescription
的用法示例。
在下文中一共展示了SimDescription.SetDeathStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
protected override bool Run(SimDescription me, bool singleSelection)
{
if (!base.Run(me, singleSelection)) return false;
foreach (SelectionCriteria.Occult.Values type in mTypes)
{
if (type.mOccult == OccultTypes.Ghost)
{
Urnstone stone = Urnstones.FindGhostsGrave(me);
if ((stone != null) && (me.CreatedSim != null))
{
stone.GhostToSim(me.CreatedSim, false, false);
}
else
{
me.SetDeathStyle(SimDescription.DeathType.None, false);
me.IsGhost = false;
me.IsNeverSelectable = false;
me.ShowSocialsOnSim = true;
me.AgingEnabled = true;
if (stone != null)
{
stone.Destroy();
}
}
}
else
{
OccultTypeHelper.Remove(me, type.mOccult, true);
}
}
return true;
}
示例2: CreateGrave
//.........这里部分代码省略.........
if (Inventories.TryToMove(urnstone, me.CreatedSim.Inventory))
{
success = true;
}
}
if ((!success) && (Sim.ActiveActor != null))
{
if (Inventories.TryToMove(urnstone, Sim.ActiveActor.Inventory))
{
success = true;
}
}
if (!success) return null;
}
if (report)
{
Common.Notify(Common.Localize("ForceKill:Success", me.IsFemale, new object[] { me }));
}
if ((addOnly) && (!ignoreExisting))
{
return urnstone;
}
if ((originalHousehold == Household.ActiveHousehold) && (me.CreatedSim != null))
{
HudModel model = HudController.Instance.Model as HudModel;
foreach (SimInfo info in model.mSimList)
{
if (info.mGuid == me.CreatedSim.ObjectId)
{
model.RemoveSimInfo(info);
model.mSimList.Remove(info);
break;
}
}
}
if (me.CreatedSim != null)
{
me.CreatedSim.Destroy();
}
if (originalHousehold != null)
{
originalHousehold.Remove(me, !originalHousehold.IsSpecialHousehold);
}
if (me.DeathStyle == SimDescription.DeathType.None)
{
if (me.IsHuman)
{
switch (deathType)
{
case SimDescription.DeathType.None:
case SimDescription.DeathType.PetOldAgeBad:
case SimDescription.DeathType.PetOldAgeGood:
deathType = SimDescription.DeathType.OldAge;
break;
}
}
else
{
switch (deathType)
{
case SimDescription.DeathType.None:
case SimDescription.DeathType.OldAge:
deathType = SimDescription.DeathType.PetOldAgeGood;
break;
}
}
me.SetDeathStyle(deathType, true);
}
me.IsNeverSelectable = true;
me.Contactable = false;
me.Marryable = false;
if (me.CreatedSim == PlumbBob.SelectedActor)
{
LotManager.SelectNextSim();
}
if (me.CareerManager != null)
{
me.CareerManager.LeaveAllJobs(Sims3.Gameplay.Careers.Career.LeaveJobReason.kDied);
}
urnstone.OnHandToolMovement();
Urnstone.FinalizeSimDeath(me, originalHousehold);
int num = ((int)Math.Floor((double)SimClock.ConvertFromTicks(SimClock.CurrentTime().Ticks, TimeUnit.Minutes))) % 60;
urnstone.MinuteOfDeath = num;
return urnstone;
}
示例3: SimToPlayableGhost
public static Urnstone SimToPlayableGhost(SimDescription me, SimDescription.DeathType deathType)
{
Urnstone urnstone = FindGhostsGrave(me);
if (urnstone == null)
{
urnstone = PrivateCreateGrave(me);
if (urnstone == null)
{
return null;
}
}
if (!Inventories.TryToMove(urnstone, me.CreatedSim))
{
MoveToMausoleum(urnstone);
}
me.IsGhost = true;
me.SetDeathStyle(deathType, true);
if (me.CreatedSim != null)
{
urnstone.GhostSetup(me.CreatedSim, true);
if (!me.IsEP11Bot)
{
me.AgingEnabled = true;
me.PushAgingEnabledToAgingManager();
}
}
return urnstone;
}