public void SetPhase(DayNightController.DayPhase phase) { switch (phase) { case DayPhase.Dawn: this.SetDawn(); break; case DayPhase.Day: this.SetDay(); break; case DayPhase.Dusk: this.SetDusk(); break; case DayPhase.Night: this.SetNight(); break; default: throw new System.ArgumentOutOfRangeException("phase", phase, "Unknown phase value"); } UpdateWorldTime(); UpdateDaylight(); UpdateFog(); }
/// <summary> /// Continues the cycle and pauses when the specified <paramref name="phase"/> is reached. /// </summary> public void ContinueToPhase(DayNightController.DayPhase phase) { this.pausePhase = phase; this.paused = false; }