public void ViewPlanet(object sender) { this.ShowShipNames = false; if (this.SelectedPlanet == null) return; if (!this.SelectedPlanet.system.ExploredDict[this.player]) { this.PlayNegativeSound(); } else { bool flag = false; foreach (Mole mole in (List<Mole>)this.player.data.MoleList) { if (mole.PlanetGuid == this.SelectedPlanet.guid) flag = true; } this.workersPanel = this.SelectedPlanet.Owner == this.player || flag || this.Debug && this.SelectedPlanet.Owner != null ? (PlanetScreen)new ColonyScreen(this.SelectedPlanet, this.ScreenManager, this.EmpireUI) : (this.SelectedPlanet.Owner == null ? (PlanetScreen)new UnexploredPlanetScreen(this.SelectedPlanet, this.ScreenManager) : (PlanetScreen)new UnownedPlanetScreen(this.SelectedPlanet, this.ScreenManager)); this.LookingAtPlanet = true; this.transitionStartPosition = this.camPos; this.transitionDestination = new Vector3(this.SelectedPlanet.Position.X, this.SelectedPlanet.Position.Y + 400f, 2500f); this.AdjustCamTimer = 2f; this.transitionElapsedTime = 0.0f; this.transDuration = 5f; if (this.ViewingShip) this.returnToShip = true; this.ViewingShip = false; this.snappingToShip = false; this.SelectedFleet = (Fleet)null; this.SelectedShip = (Ship)null; this.SelectedShipList.Clear(); this.SelectedItem = (UniverseScreen.ClickableItemUnderConstruction)null; } }
public void OpenCombatMenu(object sender) { this.workersPanel = (PlanetScreen)new CombatScreen(this.ScreenManager, this.SelectedPlanet); this.LookingAtPlanet = true; this.transitionStartPosition = this.camPos; this.transitionDestination = new Vector3(this.SelectedPlanet.Position.X, this.SelectedPlanet.Position.Y + 400f, 2500f); this.AdjustCamTimer = 2f; this.transitionElapsedTime = 0.0f; this.transDuration = 5f; if (this.ViewingShip) this.returnToShip = true; this.ViewingShip = false; this.snappingToShip = false; }