• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# InteractionObjectPair类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AddInteractions

            public override void AddInteractions(InteractionObjectPair iop, Sim actor, Sim target, List<InteractionObjectPair> results)
            {
                bool ungreeted = false;

                if (Skills.Assassination.StaticGuid != SkillNames.None)
                {
                    Relationship relationship = Relationship.Get(target, actor, false);
                    if ((relationship == null) || (relationship.LTR.CurrentLTR == LongTermRelationshipTypes.Stranger))
                    {
                        ungreeted = true;
                    }
                    else if (target.NeedsToBeGreeted(actor))
                    {
                        ungreeted = true;
                    }
                }

                if (ungreeted)
                {
                    foreach (SimDescription.DeathType type in Assassination.Types.Keys)
                    {
                        if (ActionData.Get("NRaas Assassin " + type) != null)
                        {
                            results.Add(new InteractionObjectPair(new Definition("NRaas Assassin " + type), target));
                        }
                    }
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:28,代码来源:GreetKill.cs


示例2: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, SchoolRabbitHole target, List<InteractionObjectPair> results)
 {
     foreach (AfterschoolActivityData data in AfterschoolActivityBooter.Activities.Values)
     {
         results.Add(new InteractionObjectPair(new Definition(data.mActivity.CurrentActivityType), iop.Target));
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:RabbitholeTakeChildOutOfAfterschoolClassEx.cs


示例3: AdjustInteraction

        public bool AdjustInteraction(InteractionObjectPair pair)
        {
            if (pair.InteractionDefinition is Definition) return false;

            if (pair.InteractionDefinition is GameObject.DEBUG_Sculpturify.Definition) return true;

            return false;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:Sculpturify.cs


示例4: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, Sim target, List<InteractionObjectPair> results)
 {
     PerformanceCareer occupationAsPerformanceCareer = actor.OccupationAsPerformanceCareer;
     if (((occupationAsPerformanceCareer != null) && target.SimDescription.HasActiveRole) && (target.SimDescription.AssignedRole.Type == Role.RoleType.Proprietor))
     {
         results.Add(new InteractionObjectPair(new SolicitGigEx.Definition(occupationAsPerformanceCareer.SocializationTextSolicitJob, new string[0], false), iop.Target));
     }
 }
开发者ID:Chain-Reaction,项目名称:NRaas,代码行数:8,代码来源:SolicitGigEx.cs


示例5: AddInteractions

            public override void AddInteractions(InteractionObjectPair iop, Sim actor, Computer target, List<InteractionObjectPair> results)
            {
                foreach (AfterschoolActivityData data in AfterschoolActivityBooter.Activities.Values)
                {
                    if (!AfterschoolActivityEx.HasAfterschoolActivityOfType(actor.SimDescription, data.mActivity.CurrentActivityType)) continue;

                    results.Add(new InteractionObjectPair(new Definition(data.mActivity.CurrentActivityType), iop.Target));
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:ComputerQuitAfterschoolClassEx.cs


示例6: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, Metal target, List<InteractionObjectPair> results)
 {
     results.Add(new InteractionObjectPair(new Definition(), target));
     uint stackNumber = actor.Inventory.GetStackNumber(target);
     if (stackNumber != 0x0)
     {
         List<IGameObject> stackObjects = actor.Inventory.GetStackObjects(stackNumber, true);
         results.Add(new InteractionObjectPair(new Definition(stackObjects), target));
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:10,代码来源:GetSmeltEx.cs


示例7: GetInteractionName

            public override string GetInteractionName(Sim actor, Phone target, InteractionObjectPair iop)
            {
                bool isFemale = false;
                if (mSimToCall != null)
                {
                    isFemale = mSimToCall.IsFemale;
                }

                return Common.LocalizeEAString(isFemale, "Gameplay/Objects/Electronics/Phone/CallInviteOverForeignVisitors:InteractionName");
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:10,代码来源:CallInviteOverForeignVisitorsFromRelationPanelEx.cs


示例8: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, AthleticGameObject target, List<InteractionObjectPair> results)
 {
     foreach (Sim sim in actor.LotCurrent.GetSims())
     {
         if ((actor != sim) && sim.SimDescription.TeenOrAbove)
         {
             results.Add(new InteractionObjectPair(new Definition(sim.SimDescription.FirstName, new string[] { AthleticGameObject.QueueUpTrainSim.LocalizeString(actor.IsFemale, "TrainSimMenuText", new object[0x0]) }, sim), iop.Target));
         }
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:10,代码来源:QueueUpTrainSim.cs


示例9: GetInteractionName

 public override string GetInteractionName(Sim actor, GameObject target, InteractionObjectPair iop)
 {
     if (target is Sim)
     {
         if (string.IsNullOrEmpty(MenuText))
         {
             return base.GetInteractionName(actor, target, iop);
         }
     }
     return MenuText;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:Sculpturify.cs


示例10: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, CityHall target, List<InteractionObjectPair> results)
 {                
     string parent = Localization.LocalizeString(actor.IsFemale, "Gameplay/Objects/RabbitHoles/FutureCityHall/ScheduleFireworkShow:InteractionName", new object[] { CityHall.ScheduleFireworkShow.kCostOfFireworkShow }) + Localization.Ellipsis;
     float hour = SimClock.CurrentTime().Hour;
     for (int i = 0; i < CityHall.ScheduleFireworkShow.kTimeOptionsForFireworkShow.Length; i++)
     {
         if ((CityHall.ScheduleFireworkShow.kTimeOptionsForFireworkShow[i] - 1f) > hour)
         {
             results.Add(new InteractionObjectPair(new ScheduleFireworkDefinition(parent, Localization.LocalizeString(actor.IsFemale, "Gameplay/Objects/RabbitHoles/FutureCityHall/ScheduleFireworkShow:Time", new object[] { SimClockUtils.GetText(CityHall.ScheduleFireworkShow.kTimeOptionsForFireworkShow[i]) }), CityHall.ScheduleFireworkShow.kTimeOptionsForFireworkShow[i]), iop.Target));
         }
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:ScheduleFireworkShowEx.cs


示例11: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, GameObject target, List<InteractionObjectPair> results)
 {
     string[] menuPath = new string[] { GameObject.DEBUG_Sculpturify.LocalizeString("Sculpturify", new object[0x0]) + Localization.Ellipsis };
     foreach (SculptureComponent.SculptureMaterial material in Enum.GetValues(typeof(SculptureComponent.SculptureMaterial)))
     {
         if (((material != SculptureComponent.SculptureMaterial.None) && (material != SculptureComponent.SculptureMaterial.Metal)) && (material != SculptureComponent.SculptureMaterial.Topiary))
         {
             InteractionObjectPair item = new InteractionObjectPair(new Definition(SculptingSkill.GetLocalizedMaterialName(material), material, menuPath), target);
             results.Add(item);
         }
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:Sculpturify.cs


示例12: AddInteractions

            public override void AddInteractions(InteractionObjectPair iop, Sim actor, BookToddler target, List<InteractionObjectPair> results)
            {
                if (Test(actor))
                {
                    foreach (Sim sim in actor.LotCurrent.GetSims())
                    {
                        if (!sim.SimDescription.Toddler) continue;

                        if (ReadBookData.HasSimFinishedBook(sim, target.Data.ID)) continue;

                        results.Add(new InteractionObjectPair(new BookToddler_ReadWithMenu.SubDefinition(sim), target));
                    }
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:14,代码来源:ReadToddlerBookEx.cs


示例13: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, IGameObject target, List<InteractionObjectPair> results)
 {
     CraftersConsignment targetObject = null;
     if (this.mParentRug != ObjectGuid.InvalidObjectGuid)
     {
         targetObject = GlobalFunctions.ConvertGuidToObject<CraftersConsignment>(this.mParentRug);
     }
     for (IGameObject obj2 = target.Parent; (targetObject == null) && (obj2 != null); obj2 = obj2.Parent)
     {
         targetObject = obj2 as CraftersConsignment;
     }
     if ((targetObject != null) && DisplayHelper.GetObjectsICanBuyInDisplay(actor, targetObject).Contains(target.ObjectId))
     {
         results.Add(new InteractionObjectPair(new PurchaseItemEx.Definition(target.ObjectId, DisplayHelper.ComputeFinalPriceOnObject(target.ObjectId), false), targetObject));
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:16,代码来源:ChildObjectPurchaseStubEx.cs


示例14: IsImmediateInteraction

        private static bool IsImmediateInteraction(InteractionObjectPair pair, bool isFemale)
        {
            if (pair.InteractionDefinition is IImmediateInteractionDefinition)
            {
                Type type = pair.InteractionDefinition.GetType();

                if (!type.Namespace.StartsWith("Sims3."))
                {
                    foreach (object attribute in type.GetCustomAttributes(true))
                    {
                        if (attribute is DoesntRequireTuningAttribute) return true;
                    }
                }
            }

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


示例15: AddInteractions

        public override void AddInteractions(InteractionObjectPair iop, Sim actor, WoodFireOven target, List<InteractionObjectPair> results)
        {
            List<Ingredient> simIngredients = Recipe.GetCookableIngredients(actor.Inventory);
            List<Ingredient> lotIngredients = actor.Household != null && actor.Household.SharedFridgeInventory != null ? Recipe.GetCookableIngredients(actor.Household.SharedFridgeInventory.Inventory) : new List<Ingredient>();
            List<Ingredient> list = null;

            Recipe.MealTime currentMealTime = Food.GetCurrentMealTime();
            string[] menuPath = new string[]
                {
                    WoodFireOven.LocalizeString("Serve") /*+ " " + Food.GetMealTimeString(currentMealTime)*/ + Localization.Ellipsis
                };
            foreach (WoodFireOven.WOFoodInfo info in WoodFireOven.WOFoodInfos)
            {
                Recipe current;
                if (Recipe.NameToRecipeHash.TryGetValue(info.mName, out current) && current.IsAvailableFor(currentMealTime))
                {
                    int cost = current.BuildIngredientList(simIngredients, lotIngredients, ref list, ref list).Count == 0 ? 0 : -1;
                    results.Add(new InteractionObjectPair(new OverridedWOBakeDefinition(current.GenericName, current, menuPath, target, Recipe.MealDestination.SurfaceAndCallToMeal, Recipe.MealQuantity.Group, Recipe.MealRepetition.MakeOne, false, cost), iop.Target));
                }
            }
        }
开发者ID:Chain-Reaction,项目名称:NRaas,代码行数:21,代码来源:StoreObjectInteractions.cs


示例16: 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


示例17: AddInteractions

            public override void AddInteractions(InteractionObjectPair iop, Sim actor, Bookshelf target, List<InteractionObjectPair> results)
            {
                if (actor.SimDescription.TeenOrAbove && (target.Inventory.AmountIn<BookToddler>() != 0x0))
                {
                    List<Sim> list = new List<Sim>();
                    foreach (Sim sim in actor.LotCurrent.GetSims())
                    {
                        if (sim.SimDescription.Toddler)
                        {
                            bool found = false;
                            foreach (BookToddler book in Inventories.QuickDuoFind<BookToddler,Book>(target.Inventory))
                            {
                                if (!ReadBookData.HasSimFinishedBook(sim, book.Data.ID))
                                {
                                    found = true;
                                }
                            }

                            if (found)
                            {
                                list.Add(sim);
                            }
                        }
                    }
                    if (list.Count != 0x0)
                    {
                        if (list.Count == 0x1)
                        {
                            results.Add(new InteractionObjectPair(new Definition(list[0x0], Bookshelf_ReadToToddler.LocalizeString("ReadWith", new object[] { list[0x0] }), new string[0x0]), target));
                        }
                        else
                        {
                            foreach (Sim sim2 in list)
                            {
                                results.Add(new InteractionObjectPair(new Definition(sim2, sim2.SimDescription.FirstName, new string[] { Common.LocalizeEAString("Gameplay/Objects/BookToddler:ReadWithMenuText") }), target));
                            }
                        }
                    }
                }
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:40,代码来源:ReadToddlerBookshelfEx.cs


示例18: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, IGameObject target, List<InteractionObjectPair> results)
 {
     CraftersConsignment targetObject = null;
     if (this.mParentRug != ObjectGuid.InvalidObjectGuid)
     {
         targetObject = GlobalFunctions.ConvertGuidToObject<CraftersConsignment>(this.mParentRug);
     }
     for (IGameObject obj2 = target.Parent; (targetObject == null) && (obj2 != null); obj2 = obj2.Parent)
     {
         targetObject = obj2 as CraftersConsignment;
     }
     if ((targetObject != null) && DisplayHelper.TestIfObjectCanBeBoughtByActor(target, actor)) //DisplayHelper.GetObjectsICanBuyInDisplay(actor, targetObject).Contains(target.ObjectId))
     {
         ServingContainerGroup groupServing = target as ServingContainerGroup;
         if (groupServing != null)
         {
             results.Add(new InteractionObjectPair(new PurchaseItemEx.Definition(groupServing, true), targetObject));
             results.Add(new InteractionObjectPair(new PurchaseItemEx.Definition(groupServing, false), targetObject));
             return;
         }
         results.Add(new InteractionObjectPair(new PurchaseItemEx.Definition(target.ObjectId, false), targetObject));
     }
 }
开发者ID:Chain-Reaction,项目名称:NRaas,代码行数:23,代码来源:ChildObjectPurchaseStubEx.cs


示例19: GetInteractionName

 public override string GetInteractionName(Sim a, Sim target, InteractionObjectPair interaction)
 {
     return base.GetInteractionName(a, target, new InteractionObjectPair(sOldSingleton, target));
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:AskToBehaveEx.cs


示例20: AddInteractions

 public override void AddInteractions(InteractionObjectPair iop, Sim actor, Mailbox target, List<InteractionObjectPair> results)
 {
     foreach (Mailbox.GetMailInteractionApartmentUnitData data in target.GetUnitData())
     {
         results.Add(new InteractionObjectPair(new Definition(data), target));
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:GetMailEx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# InteractionRequest类代码示例发布时间:2022-05-24
下一篇:
C# InteractionObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap