private void OnLeaveSquadClicked(UXButton button) { this.screen.HideSquadSlideButton(); this.screen.AnimateClosed(false, null); if (Service.Get <GameStateMachine>().CurrentState is GalaxyState) { ScreenController screenController = Service.Get <ScreenController>(); screenController.CloseAll(); Service.Get <GalaxyViewController>().GoToHome(true, new WipeCompleteDelegate(this.InternalOnLeaveSquadClicked), null); return; } this.InternalOnLeaveSquadClicked(null); }
public void OnEnter() { UXController uXController = Service.Get <UXController>(); uXController.MiscElementsManager.HideEventsTickerView(); uXController.HUD.ConfigureControls(new HudConfig(new string[] { "SquadScreen" })); Service.Get <UXController>().HUD.SetSquadScreenAlwaysOnTop(true); ScreenController screenController = Service.Get <ScreenController>(); screenController.CloseAll(); screenController.AddScreen(new SquadWarScreen(), false); Service.Get <WarBoardViewController>().ShowWarBoard(); }
private void OnTrainTroopsClicked(UXButton button) { Entity entity = (Entity)button.Tag; if (Service.Get <GameStateMachine>().CurrentState is GalaxyState) { ScreenController screenController = Service.Get <ScreenController>(); screenController.CloseAll(); Service.Get <GalaxyViewController>().GoToHome(true, new WipeCompleteDelegate(this.OpenTroopTrainingScreen), entity); } else { this.OpenTroopTrainingScreen(entity); } this.screen.OnSquadSlideClicked(null); }
private void OnFeatureSquadClicked(UXButton button) { this.screen.AnimateClosed(false, null); this.featureSquadButton.Enabled = false; IState currentState = Service.Get <GameStateMachine>().CurrentState; if (currentState is GalaxyState) { ScreenController screenController = Service.Get <ScreenController>(); screenController.CloseAll(); Service.Get <GalaxyViewController>().GoToHome(true, new WipeCompleteDelegate(this.InternalFeatureSquadClicked), null); return; } if (currentState is WarBoardState) { Service.Get <UXController>().HUD.SetSquadScreenAlwaysOnTop(false); this.InternalFeatureSquadClicked(null); return; } this.InternalFeatureSquadClicked(null); }