private void CloseWarScreen() { SquadWarScreen highestLevelScreen = Service.Get <ScreenController>().GetHighestLevelScreen <SquadWarScreen>(); if (highestLevelScreen != null) { highestLevelScreen.Close(null); } }
public static void ForceCloseSquadWarScreen() { if (Service.Get <WorldTransitioner>().IsTransitioning()) { return; } SquadWarScreen highestLevelScreen = Service.Get <ScreenController>().GetHighestLevelScreen <SquadWarScreen>(); if (highestLevelScreen != null) { highestLevelScreen.Close(null); } }
private void OnAlertLeaveResult(object result, object cookie) { if (result != null) { SquadMsg message = SquadMsgUtils.CreateLeaveSquadMessage(new SquadController.ActionCallback(this.OnLeaveSquadComplete), null); Service.SquadController.TakeAction(message); if (Service.GameStateMachine.CurrentState is WarBoardState) { SquadWarScreen highestLevelScreen = Service.ScreenController.GetHighestLevelScreen <SquadWarScreen>(); if (highestLevelScreen != null) { highestLevelScreen.CloseSquadWarScreen(null); } } } else { this.screen.ShowSquadSlideButton(); } }
private void OnStartWarConfirm(UXButton button) { SquadWarManager warManager = Service.SquadController.WarManager; warManager.StartMatchMaking(this.allowSameFaction); IState currentState = Service.GameStateMachine.CurrentState; if (currentState is WarBoardState) { this.screen.InstantClose(false, null); SquadWarScreen highestLevelScreen = Service.ScreenController.GetHighestLevelScreen <SquadWarScreen>(); if (highestLevelScreen != null) { highestLevelScreen.CloseSquadWarScreen(null); } } else { this.screen.AnimateClosed(false, null); } }