//Movement method private void Movement() { //Calculate the axis of movement float _horizontal = Input.GetAxis("Horizontal"); float _vertical = Input.GetAxis("Vertical"); Vector3 _direction = transform.right * _horizontal + transform.forward * _vertical; //Move the player motor.Move(_direction, speed); //If is is grounded then can jump if (motor.isGrounded) { if (Input.GetKeyDown(KeyCode.Space)) { motor.Jump(jumpForce); } } }
void Jump() { motor.Jump(speed_Jump); }
void Jump() { motor.Jump(jumpPower); }