예제 #1
0
파일: Mario.cs 프로젝트: Sway623/Mario-3902
 public void Up()
 {
     if (!IsInSpecialAnimationState())
     {
         state.Up();
         marioDirection = MarioDirection.UP;
         if (!isFalling)
         {
             ApplyJumpingForce();
         }
     }
 }
예제 #2
0
 public void Jump()
 {
     if (velocity.Y > minVelocity.Y && !isFalling)
     {
         physState   = new JumpingState(this);
         velocity.Y -= ValueHolder.jumpingVelocity;
         if (jumpFX.State == SoundState.Stopped)
         {
             jumpFX.Play();
         }
     }
     state.Up();
 }