void Update() { walkMechanics.setVerticalInput(Input.GetAxis("Vertical")); walkMechanics.setHorizontalInput(Input.GetAxis("Horizontal")); if (Input.GetButtonDown("Jump")) { climbMechanics.checkClimb(); } if (Input.GetButtonDown("Dance")) { anim.SetTrigger("Dance"); } }
void Update() { horizontalInput = Input.GetAxisRaw("Horizontal"); verticalInput = Input.GetAxisRaw("Vertical"); if (climbMechanics.getIsClimbing()) { horizontalInput = 0; verticalInput = 0; } walkMechanics.setVerticalInput(verticalInput); walkMechanics.setHorizontalInput(horizontalInput); bool jumpButton = Input.GetButtonDown("Jump"); if (jumpButton && !jumpMechanics.getIsJumping()) { climbMechanics.checkClimb(); } if (!climbMechanics.getIsClimbing()) { jumpMechanics.jump(jumpButton); } }