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


C# InteractionInstanceParameters类代码示例

本文整理汇总了C#中InteractionInstanceParameters的典型用法代码示例。如果您正苦于以下问题:C# InteractionInstanceParameters类的具体用法?C# InteractionInstanceParameters怎么用?C# InteractionInstanceParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


InteractionInstanceParameters类属于命名空间,在下文中一共展示了InteractionInstanceParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Test

 public override InteractionTestResult Test(ref InteractionInstanceParameters parameters, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     using(WoohooTuningControl control = new WoohooTuningControl(parameters.InteractionObjectPair.Tuning, Woohooer.Settings.mAllowTeenSkinnyDip))
     {
         return base.Test(ref parameters, ref greyedOutTooltipCallback);
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:SkinnyDipAskToJoin.cs

示例2: PopulatePieMenuPicker

 public override void PopulatePieMenuPicker(ref InteractionInstanceParameters parameters, out List<ObjectPicker.TabInfo> listObjs, out List<ObjectPicker.HeaderInfo> headers, out int NumSelectableRows)
 {
     Sim actor = parameters.Actor as Sim;
     NumSelectableRows = 1;
     ISkatableObject skateLocationFromParameters = base.GetSkateLocationFromParameters(parameters);
     base.PopulateSimPicker(ref parameters, out listObjs, out headers, this.GetValidSimsToSpinWith(actor, skateLocationFromParameters), false);
 }
开发者ID:Chain-Reaction,项目名称:NRaas,代码行数:7,代码来源:SpinWithEx.cs

示例3: Init

        public override void Init(ref InteractionInstanceParameters parameters)
        {
            base.Init(ref parameters);

            if (mPriority.Value < 0)
            {
                RaisePriority();
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:SnorkelSwimHere.cs

示例4: Test

            public override InteractionTestResult Test(ref InteractionInstanceParameters parameters, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!Test(parameters.Actor as Sim, parameters.Target as Terrain, parameters.Autonomous, ref greyedOutTooltipCallback))
                {
                    return InteractionTestResult.Def_TestFailed;
                }

                return base.Test(ref parameters, ref greyedOutTooltipCallback);
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:TeleportEx.cs

示例5: CreateInstance

            /*
            public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
            {
                InteractionInstance na = new FishAutonomouslyEx();
                na.Init(ref parameters);
                return na;
            }
            */

            public override InteractionTestResult Test(ref InteractionInstanceParameters parameters, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                //if (parameters.Autonomous)
                {
                    GameObjectHit gameObjectHit = InteractionInstance.CreateFakeGameObjectHit(parameters.Target.Position);
                    InteractionObjectPair iop = new IopWithCustomTuning(FishHere.Singleton, Terrain.Singleton, parameters.InteractionObjectPair.Tuning, parameters.Target.GetType());
                    InteractionInstanceParameters parameters2 = new InteractionInstanceParameters(iop, parameters.Actor, parameters.Priority, parameters.Autonomous, parameters.CancellableByPlayer, gameObjectHit);
                    return FishHere.Singleton.Test(ref parameters2, ref greyedOutTooltipCallback);
                }
                //return InteractionTestResult.Gen_NotAutonomous;
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:20,代码来源:FishAutonomouslyEx.cs

示例6: Init

        public override void Init(ref InteractionInstanceParameters parameters)
        {
            base.Init(ref parameters);

            if (GoHere.Settings.mAllowGoHereStack)
            {
                if (mPriority.Value < 0)
                {
                    RaisePriority();
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:SwimHereEx.cs

示例7: TestInteractions

        private static bool TestInteractions(Sim activeActor, GameObjectHit gameObjectHit, List<InteractionObjectPair> interactions)
        {
            bool found = false;

            for (int i = interactions.Count - 1; i >= 0; i--)
            {
                InteractionObjectPair interaction = interactions[i];

                string name = interaction.InteractionDefinition.GetType().ToString();

                bool testSuccess = false, nameSuccess = false;
                try
                {
                    InteractionInstanceParameters userDirected = new InteractionInstanceParameters(interaction, activeActor, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true);
                    userDirected.mGameObjectHit = gameObjectHit;

                    try
                    {
                        name = interaction.InteractionDefinition.GetInteractionName(ref userDirected);
                        nameSuccess = true;
                    }
                    catch
                    {
                        name = interaction.InteractionDefinition.GetType().ToString();
                    }

                    GreyedOutTooltipCallback callback = null;
                    if (IUtil.IsPass(interaction.InteractionDefinition.Test(ref userDirected, ref callback)) || (callback != null))
                    {
                        found = true;
                    }

                    testSuccess = true;
                }
                catch (Exception e)
                {
                    Common.Exception(activeActor, interaction.Target, name, e);
                }

                if ((!testSuccess) || (!nameSuccess))
                {
                    interactions.RemoveAt(i);
                }
            }

            return found;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:47,代码来源:GameObjectEx.cs

示例8: CreateGoHereWithInteractionInstance

        private static InteractionInstance CreateGoHereWithInteractionInstance(SimRoutingComponent ths, Route r, List<Sim> followers, InteractionPriority priority, bool cancellableByPlayer, out InteractionInstance ownerInteraction, GoHereWithSituation.OnFailBehavior failureBehavior, Vector3 teleportLocation)
        {
            Sim properLeader = ths.GetProperLeader(ths.OwnerSim, followers);
            InteractionInstanceParameters parameters = new InteractionInstanceParameters(new InteractionObjectPair(LeaderGoHereWith.Singleton, Terrain.Singleton), properLeader, priority, false, cancellableByPlayer);
            LeaderGoHereWith with = LeaderGoHereWith.Singleton.CreateInstanceFromParameters(ref parameters) as LeaderGoHereWith;
            with.SetOwner(ths.OwnerSim);

            with.OnFailBehavior = failureBehavior;
            if (teleportLocation != Vector3.Invalid)
            {
                with.TeleportDestination = teleportLocation;
            }
            else if (failureBehavior == GoHereWithSituation.OnFailBehavior.Teleport)
            {
                with.TeleportDestination = r.GetDestPoint();
            }

            if (properLeader != ths.OwnerSim)
            {
                followers = new List<Sim>(followers);
                followers.Remove(properLeader);
                Route route = r.ShallowCopy();
                route.ExitReasonsInterrupt = r.ExitReasonsInterrupt;
                ths.UpdateRoutingOptionsFromLeader(properLeader, route);
                route.Follower = properLeader.Proxy;
                route.Replan();
                with.SetRouteToFollow(route);
            }
            else
            {
                with.SetRouteToFollow(r);
            }

            with.SetFollowers(followers);
            GoHereWithSituationEx.CreateSituation(with);
            if (properLeader != ths.OwnerSim)
            {
                ownerInteraction = new SlaveLeaderGoHereWith.Definition(with.Situation).CreateInstance(Terrain.Singleton, ths.OwnerSim, priority, false, cancellableByPlayer);
            }
            else
            {
                ownerInteraction = null;
            }

            return with;
        }
开发者ID:GnatGoSplat,项目名称:NRaas,代码行数:46,代码来源:SimRoutingComponentEx.cs

示例9: Init

        public override void Init(ref InteractionInstanceParameters parameters)
        {
            try
            {
                base.Init(ref parameters);

                if (GoHere.Settings.mAllowGoHereStack)
                {
                    if (mPriority.Value < 0)
                    {
                        RaisePriority();
                    }
                }
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:23,代码来源:GoHereWithEx.cs

示例10: PopulateAudioPrograms

        public static void PopulateAudioPrograms(Sim actor, ref InteractionInstanceParameters parameters, out List<ObjectPicker.TabInfo> listObjs, out List<ObjectPicker.HeaderInfo> headers, out int NumSelectableRows)
        {
            NumSelectableRows = 0x1;
            headers = new List<ObjectPicker.HeaderInfo>();
            listObjs = new List<ObjectPicker.TabInfo>();
            headers.Add(new ObjectPicker.HeaderInfo(Tablet.sLocalizationKeyAudio + ":Title", "Ui/Tooltip/ObjectPicker:Name", 0xfa));
            List<ObjectPicker.RowInfo> rowInfo = new List<ObjectPicker.RowInfo>();

            SkillNames[] collection = new SkillNames[] { SkillNames.Charisma, SkillNames.Cooking, SkillNames.Gardening, SkillNames.Guitar, SkillNames.Handiness, SkillNames.Nectar };
            List<SkillNames> list2 = new List<SkillNames>(collection);
            foreach (Skill staticSkill in SkillManager.SkillDictionary)
            {
                if (staticSkill.IsHiddenSkill(actor.SimDescription.GetCASAGSAvailabilityFlags())) continue;

                // Don't include my custom skills as they increase points differently
                if (staticSkill.GetType().Assembly.FullName.Contains("NRaas")) continue;

                Skill element = actor.SkillManager.GetElement(staticSkill.Guid);
                if ((element == null) || !element.ReachedMaxLevel())
                {
                    string title = staticSkill.Name;
                    if (Localization.HasLocalizationString(Tablet.sLocalizationKeyAudio + ":" + staticSkill.Guid))
                    {
                        title = Localization.LocalizeString(Tablet.sLocalizationKeyAudio + ":" + staticSkill.Guid, new object[0]);
                    }

                    List<ObjectPicker.ColumnInfo> columnInfo = new List<ObjectPicker.ColumnInfo>();
                    ThumbnailKey thumbnail = new ThumbnailKey(staticSkill.IconKey, ThumbnailSize.Medium);
                    columnInfo.Add(new ObjectPicker.ThumbAndTextColumn(thumbnail, title));
                    ObjectPicker.RowInfo info = new ObjectPicker.RowInfo(staticSkill.Guid, columnInfo);
                    rowInfo.Add(info);
                }
            }

            ObjectPicker.TabInfo item = new ObjectPicker.TabInfo("Coupon", Tablet.LocalizeAudioProgram("TabName", new object[0x0]), rowInfo);
            listObjs.Add(item);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:37,代码来源:TabletEx.cs

示例11: Test

            public override bool Test(Sim actor, Tablet target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if ((actor.GetObjectInRightHand() != target) && !actor.Inventory.Contains(target))
                {
                    return false;
                }
                else if (actor.BuffManager.HasElement(0x9a7f5f1919df86c1L))
                {
                    return false;
                }
                InteractionInstanceParameters parameters = new InteractionInstanceParameters();

                List<ObjectPicker.TabInfo> list;
                List<ObjectPicker.HeaderInfo> list2;
                int num;

                // Custom
                TabletEx.PopulateAudioPrograms(actor, ref parameters, out list, out list2, out num);
                if (list.Count == 0x0)
                {
                    return false;
                }
                return true;
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:24,代码来源:ListenToAudioProgramEx.cs

示例12: CreateInstance

 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance instance = new WooHooSocialInteraction();
     instance.Init(ref parameters);
     return instance;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:6,代码来源:WooHooSocialInteraction.cs

示例13: CreateInstance

 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance result = new OfferToMakeRealEx();
     result.Init(ref parameters);
     return result;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:6,代码来源:OfferToMakeRealEx.cs

示例14: CreateInstance

 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance na = new ChildObjectPurchaseStubEx();
     na.Init(ref parameters);
     return na;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:6,代码来源:ChildObjectPurchaseStubEx.cs

示例15: CreateInstance

 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance na = new VisitCommunityLotEx();
     na.Init(ref parameters);
     return na;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:6,代码来源:VisitCommunityLotEx.cs


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