Exemple #1
0
 public void Jump()
 {
     if (!_isJumping())
     {
         _jumpAnimation = new JumpAnimation();
     }
 }
Exemple #2
0
 public void Update()
 {
     if (_isJumping())
     {
         if (_jumpAnimation.IsAnimationDone())
         {
             _jumpAnimation = null;
         }
         else
         {
             Clear();
             (int incr_x, int incr_y) = _jumpAnimation.GetNextIncrements();
             _x += incr_x;
             _y += incr_y;
             Draw();
         }
     }
 }