Example #1
0
    protected void JumpCharacter()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            _pPlayer.DoJumpInputDown();
        }

        if (Input.GetKeyUp(KeyCode.Space))
        {
            _pPlayer.DoJumpInputUp();
        }
    }
Example #2
0
    public void JumpCharacter()
    {
        if (p_bMoveIsLock)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            _pPlayer.DoJumpInputDown();
        }

        if (Input.GetKeyUp(KeyCode.Space))
        {
            _pPlayer.DoJumpInputUp();
        }
    }
Example #3
0
    public override void OnUpdate(ref bool bCheckUpdateCount)
    {
        base.OnUpdate(ref bCheckUpdateCount);
        bCheckUpdateCount = true;

        Vector2 directionalInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));

        player.DoInputVelocity(directionalInput, Input.GetKey(KeyCode.LeftShift));

        if (Input.GetKeyDown(KeyCode.Space))
        {
            player.DoJumpInputDown();
        }
        if (Input.GetKeyUp(KeyCode.Space))
        {
            player.DoJumpInputUp();
        }
    }