private void LateUpdate() { if (isHolding) { movementComponent.MoveCharacter(direction); } }
void FixedUpdate() { //Send input to the Movement Component in order to move the character movementComponent.MoveCharacter(Input.GetAxis("Horizontal")); if (Input.GetKeyDown(KeyCode.UpArrow)) { movementComponent.Jump(); } }
void FixedUpdate() { //Send input to the Movement Component in order to move the character movementComponent.MoveCharacter(Input.GetAxis("Horizontal")); //Check if the Up Arrow has been pressed, and if so, send the Jump input to the Movement Component if (Input.GetKeyDown(KeyCode.UpArrow)) { movementComponent.Jump(); } }