예제 #1
0
 protected override void PreStart()
 {
     _current = 1;
     _currentAnimation = _animationList[0];
     for (int i = 0; i < _animationList.Count; i++)
     {
         _animationList[i].Speed = _delta;
         _animationList[i].Reverse = _reverse;
         _animationList[i].Loop = false;
     }
     _currentAnimation.Start();
 }
예제 #2
0
 protected override bool UpdateFrame()
 {
     if (_reverse)
     {
         if (_isReversing)
         {
             if (!_currentAnimation.IsPlaying)
             {
                 if (_current >= 0)
                 {
                     _currentAnimation = _animationList[(int) _current];
                     _currentAnimation.Enable = true;
                     _current--;
                 }
                 else
                 {
                     _isReversing = false;
                     return true;
                 }
             }
         }
         else
         {
             if (_currentAnimation.IsReversing)
             {
                 if (_current < _animationList.Count)
                 {
                     _currentAnimation.Enable = false;
                     _currentAnimation = _animationList[(int) _current];
                     _currentAnimation.Start();
                     _current++;
                 }
                 else
                 {
                     _current = _animationList.Count - 1;
                     _isReversing = true;
                 }
             }
         }
     }
     else
     {
         if (!_currentAnimation.IsPlaying)
         {
             if (_current < _animationList.Count)
             {
                 _currentAnimation = _animationList[(int) _current];
                 _currentAnimation.Start();
                 _current++;
             }
             else
             {
                 return true;
             }
         }
     }
     return false;
 }