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


C# InteractionObjectPair类代码示例

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


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


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