示例#1
0
        private void Jump()
        {
            // if airborne and the player has not used coyote time jump
            // then take away a jump
            if (_moveStateMachine.GetCurrentState() == MoveState.AIRBORNE && _coyoteTime == 0f && _jumpCount == 0)
            {
                _jumpCount++;
            }

            if (_jumpCount < MAX_JUMPS)
            {
                StartFlip();
                _velocityComponent.Jump(JUMP_SPEED);
                _jumpCount++;
            }
        }