public void StartNewGame() { var worldContext = UniverseGeneration.GenerateWorld(); var worldHolder = WorldHolder.GetWorldHolderInCurrentScene(); Assert.IsFalse(worldHolder.IsWorldLoaded, "Some world was already loaded in WorldHolder while started a new game from main menu."); worldHolder.WorldContext = worldContext; SceneManager.LoadScene("Space"); }
private void Awake() { INSTANCE = this; }
private void Start() { _worldContext = WorldHolder.GetWorldContextInCurrentScene(); _worldContext.WorldCtl.TurnStarted += OnTurnStarted; GetComponent <ShipWatcher>().Ship.CurrentTaskUpdatedOrChanged += OnFlightTaskUpdatedOrChanged; }