void Update() { Int2 movementInput = InputHelper.GetWASDMovement(); int elevationInput = Convert.ToInt32(Input.GetKey(KeyCode.E)) - Convert.ToInt32(Input.GetKey(KeyCode.Q)); if (movementInput == Int2.zero && elevationInput == 0) { return; } Elevation = elevationRange.Clamp(Elevation + elevationInput * elevationSpeed * Time.deltaTime); Position += movementInput * Elevation * movementSpeed * Time.deltaTime; OnReoriented?.Invoke(); }
void Start() { OnReoriented?.Invoke(); }