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


C# OTAnimation类代码示例

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


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

示例1: Setup

 // Use this for initialization
 public void Setup()
 {
     _animations = GameObject.Find("Frameworks/OT/Animations/player").GetComponent<OTAnimation>();
     _animSprite = GetComponentInChildren<OTAnimatingSprite>();
     _STATIC = "static";
     _WALK = "walk";
     _WALKFASTER = "walkfaster";
     _MAXWALK = "maxwalk";
     _CURR = "walk";
 }
开发者ID:Tavrox,项目名称:Lavapools,代码行数:11,代码来源:PlayerAnims.cs

示例2: SetAnimationFrame

    void SetAnimationFrame(OTAnimation.Frame animationFrame)
    {
        if (spriteContainer != animationFrame.container || animationFrame.frameIndex != frameIndex)
        {
            if (passive)
            {
                spriteContainer = animationFrame.container;
                frameIndex = animationFrame.frameIndex;
            }
            else
            {
                _spriteContainer = animationFrame.container;
                _frameIndex = animationFrame.frameIndex;
            }

            if (onAnimationFrame != null)
                onAnimationFrame(this);
            if (!CallBack("onAnimationFrame", callBackParams))
                CallBack("OnAnimationFrame", callBackParams);

            isDirty = true;
        }
    }
开发者ID:borderpointer,项目名称:zhoras-adventure,代码行数:23,代码来源:OTAnimatingSprite.cs

示例3: RemoveAnimation

 public static void RemoveAnimation(OTAnimation o)
 {
     if (isValid)
         instance._RemoveAnimation(o);
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:5,代码来源:OT.cs

示例4: Awake

 // Use this for initialization
 protected void Awake()
 {
     anim = GetComponent<OTAnimation>();
     sprite = GetComponent<OTAnimatingSprite>();
 }
开发者ID:mattabios,项目名称:Mythos-High-Interface,代码行数:6,代码来源:SpriteControl.cs

示例5: PlayBackward

 /// <summary>
 /// Plays a specific animation partly backward from a start frame to an end frame, starting after a delay.
 /// </summary>
 /// <param name="animation">Animation to play</param>
 /// <param name="startFrame">Animation frame number (from the back) where to start.</param>
 /// <param name="endFrame">Animation frame number (from the back) where to end.</param>
 /// <param name="delay">After this delay in seconds the animation will be started.</param>
 public void PlayBackward(OTAnimation animation, int startFrame, int endFrame, float delay)
 {
     if (animation != null)
     {
         this.animation = animation;
         this.animationFrameset = "";
         PlayBackward(startFrame, endFrame, delay);
     }
 }
开发者ID:robmerrell,项目名称:game-off-2012,代码行数:16,代码来源:OTAnimatingSprite.cs

示例6: _DestroyAnimation

 void _DestroyAnimation(OTAnimation animation)
 {
     _RemoveAnimation(animation);
     if (animation.gameObject != null)
         Destroy(animation.gameObject);
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:6,代码来源:OT.cs

示例7: _RegisterAnimationLookup

 void _RegisterAnimationLookup(OTAnimation animation, string oldName)
 {
     if (animationList.Contains(animation))
     {
         if (animations.ContainsKey(oldName.ToLower()) && animations[oldName.ToLower()] == animation)
             animations.Remove(oldName.ToLower());
         if (animations.ContainsKey(animation.name.ToLower()))
             animations.Remove(animation.name.ToLower());
         animations.Add(animation.name.ToLower(), animation);
     }
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:11,代码来源:OT.cs

示例8: _RemoveAnimation

 void _RemoveAnimation(OTAnimation animation)
 {
     if (animationList.Contains(animation))
     {
         string lname = animation.name.ToLower();
         if (animations.ContainsKey(lname))
             animations.Remove(lname);
         if (animationList.Contains(animation))
             animationList.Remove(animation);
     }
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:11,代码来源:OT.cs

示例9: _RegisterAnimation

    void _RegisterAnimation(OTAnimation animation)
    {
        if (!animationList.Contains(animation))
            animationList.Add(animation);
        if (!animations.ContainsKey(animation.name.ToLower()))
            animations.Add(animation.name.ToLower(), animation);
        else
        {
            if (animations[animation.name.ToLower()] != animation)
                Debug.LogError("More than one Animation with name '" + animation.name + "'");
        }
		
		foreach (Transform child in transform)
		{
			if (child.name.ToLower() == "animations")
			{
				animation.transform.parent = child.transform;
				break;
			}
		}
				
		
    }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:23,代码来源:OT.cs

示例10: _ResetAnimation

	void _ResetAnimation(OTAnimation animation)
	{
		animation.Reset();		
	}
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:4,代码来源:OT.cs

示例11: Awake

 void Awake()
 {
     anim = GetComponent<OTAnimation>();
     sprite = GetComponent<OTAnimatingSprite>();
     unit = GetComponent<Unit>();
     cc = GetComponent<CharacterController>();
     ac = GetComponent<AudioControl>();
 }
开发者ID:cmapua,项目名称:Mythos-High,代码行数:8,代码来源:SpriteControl.cs

示例12: Awake

 // Use this for initialization
 protected void Awake()
 {
     anim = GetComponent<OTAnimation>();
     sprite = GetComponent<OTAnimatingSprite>();
     print (	sprite.animationFrameset);
 }
开发者ID:mattabios,项目名称:Mythos-High,代码行数:7,代码来源:SpriteControl.cs

示例13: RegisterAnimation

 public static void RegisterAnimation(OTAnimation animation)
 {
     if (isValid)
         instance._RegisterAnimation(animation);
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:5,代码来源:OT.cs

示例14: RegisterAnimationLookup

 public static void RegisterAnimationLookup(OTAnimation animation, string oldName)
 {
     if (isValid)
         instance._RegisterAnimationLookup(animation, oldName);
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:5,代码来源:OT.cs

示例15: DestroyAnimation

 /// <summary>
 /// Destroys an Orthello animation
 /// </summary>
 public static void DestroyAnimation(OTAnimation animation)
 {
     if (isValid)
         instance._DestroyAnimation(animation);
 }
开发者ID:KonstantinDavidov,项目名称:hotfix,代码行数:8,代码来源:OT.cs


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