private void select(int bodyIndex) { this.selectedBody = bodyIndex; switch (controller.BodyType(bodyIndex)) { case BodyType.OwnStellaris: siteView.SetView(controller.StellarisController()); setView(siteView); break; case BodyType.OwnColony: siteView.SetView(controller.ColonyController(bodyIndex)); setView(siteView); break; case BodyType.NotColonised: emptyPlanetView.SetView(controller.EmptyPlanetController(bodyIndex), currentPlayer); setView(emptyPlanetView); break; default: //TODO(later): add implementation, foregin planet, empty system, foreign system break; } this.setupSelectionMarker(); }
public void PlayTurn() { this.playerController.RunAutomation(); foreach (var stellaris in this.playerController.Stellarises()) { StarSystemController starSystem = this.playerController.OpenStarSystem(stellaris.HostStar); manage(starSystem.StellarisController()); } this.playerController.EndGalaxyPhase(); }
public void PlayTurn() { foreach (var stellaris in this.playerController.Stellarises()) { StarSystemController starSystem = this.playerController.OpenStarSystem(stellaris.HostStar); manage(starSystem.StellarisController()); foreach (var planet in starSystem.Planets) { if (starSystem.BodyType(planet.Position) == BodyType.OwnColony) { manage(starSystem.ColonyController(planet.Position)); } } } this.playerController.EndGalaxyPhase(); }
void IGalaxyViewListener.SystemSelected(StarSystemController systemController) { if (this.InvokeRequired) { this.BeginInvoke(new Action <StarSystemController>(((IGalaxyViewListener)this).SystemSelected), systemController); return; } //FIXME(later) update owner check when multiple stellarises can exist at the same star if (systemController.StarsAdministration() == null || systemController.StarsAdministration().Owner != this.currentPlayer.Info) { this.constructionManagement.Visible = false; return; } this.constructionManagement.SetView(systemController.StellarisController()); this.constructionManagement.Visible = true; this.fleetController = null; this.fleetPanel.Visible = false; }