本文整理汇总了C#中Sim.PlayReaction方法的典型用法代码示例。如果您正苦于以下问题:C# Sim.PlayReaction方法的具体用法?C# Sim.PlayReaction怎么用?C# Sim.PlayReaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim.PlayReaction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyPostShowerEffects
public static void ApplyPostShowerEffects(Sim actor, IShowerable shower)
{
BuffManager buffManager = actor.BuffManager;
buffManager.RemoveElement(BuffNames.Singed);
buffManager.RemoveElement(BuffNames.SingedElectricity);
buffManager.RemoveElement(BuffNames.GarlicBreath);
SimDescription simDescription = actor.SimDescription;
simDescription.RemoveFacePaint();
if (simDescription.IsMummy)
{
buffManager.AddElement(BuffNames.Soaked, Origin.FromShower);
}
if (RandomUtil.RandomChance((float)shower.TuningShower.ChanceOfExhileratingShowerBuff))
{
buffManager.AddElement(BuffNames.ExhilaratingShower, Origin.FromNiceShower);
}
if (actor.HasTrait(TraitNames.Hydrophobic))
{
actor.PlayReaction(ReactionTypes.Cry, shower as GameObject, ReactionSpeed.AfterInteraction);
}
else if (shower.ShouldGetColdShower)
{
actor.BuffManager.AddElement(BuffNames.ColdShower, Origin.FromCheapShower);
EventTracker.SendEvent(EventTypeId.kGotColdShowerBuff, actor, shower);
}
// Custom
else if ((shower.Cleanable != null) && (shower.Cleanable.NeedsToBeCleaned))
{
actor.PlayReaction(ReactionTypes.Retch, shower as GameObject, ReactionSpeed.AfterInteraction);
}
actor.Motives.SetMax(CommodityKind.Hygiene);
}
示例2: Perform
public override void Perform(Sim sim, DiseaseVector vector)
{
sim.PlayReaction(mType, mSpeed);
}