protected void InitAgent(AnimationInfo agent)
 {
     agent.Reset(agent.AnimName);
     agent.GetComponent <IKAnimator>().Reset();
     agent.GetComponent <Animation>().enabled = true;
     agent.GetComponent <Animation>().Play(agent.AnimName);
 }
 protected void ResetComponents(AnimationInfo agent)
 {
     agent.GetComponent <Animation>().Stop();
     agent.GetComponent <FlourishAnimator>().Reset();
     agent.GetComponent <TorsoController>().Reset();
     agent.Reset(agent.AnimName);
     agent.GetComponent <IKAnimator>().Reset();
 }
Beispiel #3
0
 internal void OnEndOfAnimLoopReached(AnimationInfo animation)
 {
     if (_queuedAnimationID.HasValue)
     {
         animation.IsStopped = true;
         animation.Reset();
         _currentAnimationID = _queuedAnimationID.Value;
         _animations[_queuedAnimationID.Value].Play();
         UpdateBoundingRectSize();
         _queuedAnimationID = null;
     }
     if (EndOfAnimLoopReached != null)
     {
         EndOfAnimLoopReached(animation, EventArgs.Empty);
     }
 }