Esempio n. 1
0
 void Start()
 {
     currentAnimation                   = SaraAnimation.idle_sara;
     spineAnimation                     = GetComponent <SkeletonAnimation>();
     spineAnimation.AnimationName       = currentAnimation.ToString();
     spineAnimation.AnimationState.End += OnAnimationEnded;
 }
Esempio n. 2
0
 void SetAnimation(SaraAnimation anim, bool loop)
 {
     if (currentAnimation != anim || spineAnimation.loop != loop)
     {
         currentAnimation             = anim;
         spineAnimation.loop          = loop;
         spineAnimation.AnimationName = currentAnimation.ToString();
     }
 }