Example #1
0
#pragma warning restore 0649

    protected void Update()
    {
        if (GamePadManager.GetJumpInput((int)EPlayer.Player1) || GamePadManager.GetJumpInput((int)EPlayer.Player2))
        {
            UpdateScrollView(false);
        }
        else if (GamePadManager.GetCrouchInput((int)EPlayer.Player1) || GamePadManager.GetCrouchInput((int)EPlayer.Player2))
        {
            UpdateScrollView(true);
        }
    }
Example #2
0
    public static bool GetJumpInput(int playerIndex)
    {
        bool isJumping = false;

        if (GamePadManager.UpdateGamePadsState() == EGamePadsConnectedState.Connected)
        {
            isJumping = GamePadManager.GetJumpInput(playerIndex);
        }
        else
        {
            isJumping = Input.GetKey(K_UP);
        }
        return(isJumping);
    }