Exemplo n.º 1
0
    public bool GetButtonUp(string i_ButtonName)
    {
        if (m_InputProvider == null)
        {
            return(false);
        }

        return(m_InputProvider.GetButtonUp(i_ButtonName));
    }
        protected virtual void HandleJump()
        {
            if (InputProvider.GetButtonDown("Jump"))
            {
                if (IsOnGround)
                {
                    Velocity.y = MaxJumpVelocity;
                    _animation.Jump();
                }
            }

            if (InputProvider.GetButtonUp("Jump"))
            {
                if (Velocity.y > MinJumpVelocity)
                {
                    Velocity.y = MinJumpVelocity;
                }
            }
        }