void Update() { Vector2 directionalInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); player.SetDirectionalInput(directionalInput); if (Input.GetButtonDown("Jump")) { player.OnJumpInputDown(); } if (Input.GetButtonUp("Jump")) { player.OnJumpInputUp(); } }
void Update() { Vector2 directionalInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); player.SetDirectionalInput(directionalInput); if (Input.GetKeyDown(KeyCode.Space)) { player.OnJumpInputDown(); } if (Input.GetKeyUp(KeyCode.Space)) { player.OnJumpInputUp(); } if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift)) { player.OnDashInputDown(); } }