Esempio n. 1
0
 public static void PlayAnimation(this AnimationComponent com, string clipName, float speed, WrapMode mode)
 {
     if (com.animation != null)
     {
         com.animation[clipName].speed    = speed;
         com.animation[clipName].wrapMode = mode;
         com.animation.clip = com.animation[clipName].clip;
         com.animation.Play(clipName);
     }
 }
Esempio n. 2
0
 public static void SetAnimation(this AnimationComponent com, Animation animation)
 {
     com.animation = animation;
 }
Esempio n. 3
0
 public static bool HasPlayingClip(this AnimationComponent com)
 {
     return(com.animation.clip != null && com.animation.IsPlaying(com.animation.clip.name));
 }