Exemple #1
0
 private void Landed()
 {
     if (position.Y > 400)
     {
         if (landed == false)
         {
             landed = true;
             //current.Stop();
             current = idle;
             current.Start();
         }
         position.Y = 400;
         
         jumping = false;
     }
 }
Exemple #2
0
 //velocity.Y += (deltaTime / 100) * 2;
 private void Jump()
 {
     jumping = true;
     landed = false;
     velocity.Y  = (deltaTime / 100) * -50;
     if(current != jump)
     {
         //current.Stop();
         current = jump;
         current.Start();
     }
 }