本文整理汇总了C#中Sim.GetActiveJetpack方法的典型用法代码示例。如果您正苦于以下问题:C# Sim.GetActiveJetpack方法的具体用法?C# Sim.GetActiveJetpack怎么用?C# Sim.GetActiveJetpack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim.GetActiveJetpack方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public override bool Test(Sim actor, Jetpack target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (!Jetpack.IsAllowedToUseJetpack(actor))
{
return false;
}
if (actor.GetActiveJetpack() == null)
{
return false;
}
if (actor.GetActiveJetpack() != target)
{
return false;
}
/*
if (actor.SimDescription.IsPregnant)
{
greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, "Gameplay/Actors/Sim:PregnantFailure", new object[0x0]));
return false;
}
*/
return true;
}
示例2: OnAccept
public static void OnAccept(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
actor.Motives.SetDecay(CommodityKind.Fun, true);
target.Motives.SetDecay(CommodityKind.Fun, true);
actor.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
target.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
if (CommonPregnancy.IsSuccess(actor, target, i.Autonomous, CommonWoohoo.WoohooStyle.TryForBaby))
{
CommonPregnancy.Impregnate(actor, target, i.Autonomous, CommonWoohoo.WoohooStyle.TryForBaby);
}
CommonWoohoo.RunPostWoohoo(actor, target, actor.GetActiveJetpack(), CommonWoohoo.WoohooStyle.TryForBaby, CommonWoohoo.WoohooLocation.Jetpack, true);
}
catch (ResetException)
{
throw;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}
示例3: Test
public override bool Test(Sim a, Terrain target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (a.IsInRidingPosture)
{
return false;
}
if (a.GetActiveJetpack() == null)
{
return false;
}
/* Custom
if (a.SimDescription.IsVisuallyPregnant)
{
greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(a.SimDescription.IsFemale, "Gameplay/ActorSystems/OccultImaginaryFriend:ImaginaryFriendModeDisabledPregnancy", new object[] { a.SimDescription }));
return false;
}
*/
return true;
}
示例4: AddInteractions
public override void AddInteractions(InteractionObjectPair iop, Sim Actor, Sim Target, List<InteractionObjectPair> results)
{
if (Actor == Target)
{
Jetpack activeJetpack = Actor.GetActiveJetpack();
if (activeJetpack != null)
{
// Custom
results.Add(new InteractionObjectPair(new FlyToLotEx.Definition(true, true), activeJetpack));
results.Add(new InteractionObjectPair(new FlyToLotEx.Definition(false, true), activeJetpack));
}
if ((activeJetpack == null) && (Actor.Inventory != null))
{
activeJetpack = Actor.Inventory.Find<Jetpack>();
}
if (activeJetpack != null)
{
results.Add(new InteractionObjectPair(new Jetpack.UseJetpack.Definition(true), activeJetpack));
}
}
}
示例5: AfterJetPackWoohoo
public static void AfterJetPackWoohoo(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i)
{
try
{
actor.Motives.SetDecay(CommodityKind.Fun, true);
target.Motives.SetDecay(CommodityKind.Fun, true);
actor.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
target.Motives.ChangeValue(CommodityKind.Fun, Jetpack.kFunGainJetPackWoohoo);
CommonWoohoo.RunPostWoohoo(actor, target, actor.GetActiveJetpack(), CommonWoohoo.WoohooStyle.Safe, CommonWoohoo.WoohooLocation.Jetpack, true);
}
catch (ResetException)
{
throw;
}
catch (Exception e)
{
Common.Exception(actor, target, e);
}
}