void Update() { if (Input.GetKeyDown(_passSingleDayButton)) { _time.PassDay(); } if (Input.GetKeyDown(_passDayCountButton)) { for (int i = 0; i < _passAmount; ++i) { _time.PassDay(); } } if (Input.GetKeyDown(_passAltDayCountButton)) { for (int i = 0; i < _altPassAmount; ++i) { _time.PassDay(); } } }
private void Update() { if (Input.GetKeyDown(_pauseButton)) { _isPaused = !_isPaused; } if (!_isPaused) { _elapsedToday += Time.deltaTime; while (_elapsedToday > _secondsPerDay) { _time.PassDay(); _elapsedToday -= _secondsPerDay; } } }