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


C# GameObject.AddInteraction方法代码示例

本文整理汇总了C#中GameObject.AddInteraction方法的典型用法代码示例。如果您正苦于以下问题:C# GameObject.AddInteraction方法的具体用法?C# GameObject.AddInteraction怎么用?C# GameObject.AddInteraction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObject的用法示例。


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

示例1: AddInteractions

 public static void AddInteractions(GameObject obj)
 {
     obj.RemoveAllInteractions();
     if ((obj != null) && (obj.Interactions != null))
     {
         obj.AddInteraction(ShoppingInteraction.ShopForClothes.Singleton);
         obj.AddInteraction(ShoppingInteraction.SuggestOutfit.Singleton);
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:AddMenuItem.cs

示例2: AddMoveInteractions

        public static void AddMoveInteractions(GameObject gameObject)
        {
            if (!(gameObject is Sim))
            {
                LocationVectors vectors = new LocationVectors();
                vectors.ForwardVector = new Vector3(gameObject.ForwardVector);
                vectors.Position = new Vector3(gameObject.Position);
                MovedObjects.Add(gameObject, vectors);
                gameObject.AddInteraction(StopMovingMe.Singleton);
            }

            gameObject.AddInteraction(MoveUp.Singleton);
            gameObject.AddInteraction(MoveUpUserDefined.Singleton);
            gameObject.AddInteraction(MoveDown.Singleton);
            gameObject.AddInteraction(MoveDownUserDefined.Singleton);
            gameObject.AddInteraction(TurnLeft.Singleton);
            gameObject.AddInteraction(TurnRight.Singleton);
            gameObject.AddInteraction(TurnAround.Singleton);
            gameObject.AddInteraction(TiltFaceUp.Singleton);
            gameObject.AddInteraction(TiltBack.Singleton);
            gameObject.AddInteraction(TiltForward.Singleton);
            gameObject.AddInteraction(TiltFaceDown.Singleton);
            gameObject.AddInteraction(TiltUserDefined.Singleton);
            gameObject.AddInteraction(MoveBack.Singleton);
            gameObject.AddInteraction(MoveBackUserDefined.Singleton);
            gameObject.AddInteraction(MoveForward.Singleton);
            gameObject.AddInteraction(MoveForwardUserDefined.Singleton);
            gameObject.AddInteraction(MoveRight.Singleton);
            gameObject.AddInteraction(MoveRightUserDefined.Singleton);
            gameObject.AddInteraction(MoveLeft.Singleton);
            gameObject.AddInteraction(MoveLeftUserDefined.Singleton);
            gameObject.AddInteraction(TurnAtAngle.Singleton);
        }
开发者ID:markmanching,项目名称:virtual-artisan-s3mods,代码行数:33,代码来源:PoseManager.cs

示例3: InitInteractions

        public static void InitInteractions(GameObject obj)
        {
            ServingContainer container = obj as ServingContainer;
            if (container != null)
            {
                // EA fail
                container.RemoveInteractionByType(ServingContainerGroup.CallToMeal.Singleton);
            }

            WeddingCake cake = obj as WeddingCake;
            if (cake != null)
            {
                cake.RemoveInteractionByType(WeddingCake.CutWeddingCake.Singleton);
            }

            Snack container2 = obj as Snack;
            if (container2 != null)
            {
                if (obj != null)
                {
                    obj.RemoveInteractionByType(CraftersConsignment.ChildObjectBrowseStub.Singleton);
                    obj.RemoveInteractionByType(CraftersConsignment.ChildObjectPurchaseStub.Singleton);
                    obj.AddInteraction(CraftersConsignment.ChildObjectBrowseStub.Singleton);
                    obj.AddInteraction(CraftersConsignment.ChildObjectPurchaseStub.Singleton);

                    obj.RemoveInteractionByType(Sims3.Gameplay.Objects.CookingObjects.Eat.Singleton);
                    obj.RemoveInteractionByType(Snack_CleanUp.Singleton);
                }

                ISpoilable spoil = container2 as ISpoilable;
                if (spoil != null)
                {
                    spoil.UpdateSpoilageTime(true, -1f);
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:36,代码来源:BakeryController.cs


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