// Prepares the stage for playing // Also begins a new game if one hasn't been started yet for easier debugging public void SetupStage() { // Make sure simulation parameters is loaded if (SimulationParameters.Instance == null) { GD.PrintErr("Something bad happened with SimulationParameters loading"); } // Make sure settings is loaded if (Settings.Instance == null) { GD.PrintErr("Settings load problem"); } spawner.Init(); Clouds.Init(FluidSystem); if (CurrentGame == null) { StartNewGame(); } CreatePatchManagerIfNeeded(); StartMusic(); }
// Prepares the stage for playing // Also begins a new game if one hasn't been started yet for easier debugging public void SetupStage() { // Make sure simulation parameters is loaded if (SimulationParameters.Instance == null) { GD.PrintErr("Something bad happened with SimulationParameters loading"); } // Make sure settings is loaded if (Settings.Instance == null) { GD.PrintErr("Settings load problem"); } if (!IsLoadedFromSave) { spawner.Init(); if (CurrentGame == null) { StartNewGame(); } } if (CurrentGame == null) { throw new InvalidOperationException("current game is not set"); } tutorialGUI.EventReceiver = TutorialState; pauseMenu.GameProperties = CurrentGame; Clouds.Init(FluidSystem); CreatePatchManagerIfNeeded(); StartMusic(); if (IsLoadedFromSave) { HUD.OnEnterStageTransition(false); UpdatePatchSettings(true); } else { HUD.OnEnterStageTransition(true); TutorialState.SendEvent(TutorialEventType.EnteredMicrobeStage, EventArgs.Empty, this); } }