void GetInputSpeed() { if (Input.GetKeyDown(KeyCode.W) || bodyMovement.shakeHands()) { speed += acceleration; } if (Input.GetKey(KeyCode.S) || bodyMovement.pull()) { // speed -= acceleration/15; } speed = Mathf.Clamp(speed, 0f, maxSpeed); }
void GetInputSpeed() { if (Input.GetKeyDown(KeyCode.W) || bodyMovement.shakeHands()) { speed += acceleration; } if (Input.GetKey(KeyCode.S) || bodyMovement.pull()) { // speed -= acceleration/15; } speed = Mathf.Clamp(speed, 0f, maxSpeed); }