Пример #1
0
        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");
        }
Пример #2
0
 private void Awake()
 {
     INSTANCE = this;
 }
Пример #3
0
 private void Start()
 {
     _worldContext = WorldHolder.GetWorldContextInCurrentScene();
     _worldContext.WorldCtl.TurnStarted += OnTurnStarted;
     GetComponent <ShipWatcher>().Ship.CurrentTaskUpdatedOrChanged += OnFlightTaskUpdatedOrChanged;
 }