예제 #1
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;
 }
예제 #2
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();
 }
예제 #3
0
 public void Remove(Animation animation)
 {
     _animationList.Remove(animation);
 }
예제 #4
0
 public void Add(Animation animation)
 {
     _animationList.Add(animation);
 }
예제 #5
0
 public override void Dispose()
 {
     _animations = null;
     _actions = null;
     _currentAnimation = null;
     _currentAction = null;
     _surfaceSense = null;
     base.Dispose();
 }
예제 #6
0
 private void _scale_OnEnd1(Animation sender)
 {
     _timer.Start();
 }
예제 #7
0
 private void _scale_OnEnd(Animation sender)
 {
     _sprite.Parent.Remove(_sprite);
 }