public void Up() { if (!IsInSpecialAnimationState()) { state.Up(); marioDirection = MarioDirection.UP; if (!isFalling) { ApplyJumpingForce(); } } }
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(); }