本文整理汇总了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";
}
示例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;
}
}
示例3: RemoveAnimation
public static void RemoveAnimation(OTAnimation o)
{
if (isValid)
instance._RemoveAnimation(o);
}
示例4: Awake
// Use this for initialization
protected void Awake()
{
anim = GetComponent<OTAnimation>();
sprite = GetComponent<OTAnimatingSprite>();
}
示例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);
}
}
示例6: _DestroyAnimation
void _DestroyAnimation(OTAnimation animation)
{
_RemoveAnimation(animation);
if (animation.gameObject != null)
Destroy(animation.gameObject);
}
示例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);
}
}
示例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);
}
}
示例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;
}
}
}
示例10: _ResetAnimation
void _ResetAnimation(OTAnimation animation)
{
animation.Reset();
}
示例11: Awake
void Awake()
{
anim = GetComponent<OTAnimation>();
sprite = GetComponent<OTAnimatingSprite>();
unit = GetComponent<Unit>();
cc = GetComponent<CharacterController>();
ac = GetComponent<AudioControl>();
}
示例12: Awake
// Use this for initialization
protected void Awake()
{
anim = GetComponent<OTAnimation>();
sprite = GetComponent<OTAnimatingSprite>();
print ( sprite.animationFrameset);
}
示例13: RegisterAnimation
public static void RegisterAnimation(OTAnimation animation)
{
if (isValid)
instance._RegisterAnimation(animation);
}
示例14: RegisterAnimationLookup
public static void RegisterAnimationLookup(OTAnimation animation, string oldName)
{
if (isValid)
instance._RegisterAnimationLookup(animation, oldName);
}
示例15: DestroyAnimation
/// <summary>
/// Destroys an Orthello animation
/// </summary>
public static void DestroyAnimation(OTAnimation animation)
{
if (isValid)
instance._DestroyAnimation(animation);
}