public MainGalaxyViewModel(IGalaxyPopulator initGalaxyCreator, IGalaxyViewModelFactory initGalaxyViewModelFactory, ISolarSystemViewModelFactory initSolarSystemViewModelFactory, IPlanetViewModelFactory initPlanetViewModelFactory, ITextOutputViewModel initTextOutputViewModel, ITickEngine initTickEngine) { _galaxyCreator = initGalaxyCreator; _tickEngine = initTickEngine; _galaxyViewModelFactory = initGalaxyViewModelFactory; _solarSystemViewModelFactory = initSolarSystemViewModelFactory; _planetViewModelFactory = initPlanetViewModelFactory; TextOutput = initTextOutputViewModel; StarChart.InitialiseStarChart(); ResourceTypes.InitialiseResourceTypes(); BluePrints.InitialiseBluePrints(); loadOrCreateGalaxy(); initialiseEngine(); saveGalaxy(); }
/// <summary> /// Initialise the game engine. /// </summary> private void Init() { theUserInputPlayer = new UserInputPlayer(); ObjectGame.TheUserInputPlayer = theUserInputPlayer; theTickEngine = new TickEngineThread(); theTickEngine.Setup("GameEngine", GameTick, StatusTick, timerTickIntervalMs); watch = Stopwatch.StartNew(); watch.Stop(); }