当前位置: 首页>>代码示例>>C#>>正文


C# Sim.GetActiveJetpack方法代码示例

本文整理汇总了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;

            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:25,代码来源:FlyToLotEx.cs

示例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);
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:25,代码来源:JetpackTryForBaby.cs

示例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;
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:20,代码来源:FlyHereEx.cs

示例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));
         }
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:21,代码来源:UseJetpackProxyEx.cs

示例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);
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:19,代码来源:CommonSocials.cs


注:本文中的Sim.GetActiveJetpack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。