// Update is called once per frame void Update() { // TEST if (Input.GetKeyDown(KeyCode.U)) { // Hurt yourself when you press U player.Hurt(10, new Vector2(1, 1)); } GetInput(); player.Move(inputH); player.Climb(inputV); if (isJumping) { player.Jump(); } if (isCrouching) { player.Crouch(); } else { player.UnCrouch(); } }
void Update() { GetInput(); player.Move(inputH); if (isJumping) { player.Jump(); } if (isCrouching) { player.Crouch(); } else { player.UnCrouch(); } }
// Update is called once per frame void Update() { // Update input GetInput(); //Control the Player with input player.Move(inputH); player.Climb(inputV); if (isJumping) //If jump input is made { // Make the controller jump player.Jump(); } if (isCrouching) // if coruch input is made { // Make the controller crouch player.Crouch(); } else //If the input is released { //Uncrouch the controller player.UnCrouch(); } }