Beispiel #1
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();
        }
    }
Beispiel #2
0
 protected void StopMoveCharacter()
 {
     _pPlayer.DoInputVelocity(Vector2.zero, false);
 }