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