Example #1
0
        private void CloseWarScreen()
        {
            SquadWarScreen highestLevelScreen = Service.Get <ScreenController>().GetHighestLevelScreen <SquadWarScreen>();

            if (highestLevelScreen != null)
            {
                highestLevelScreen.Close(null);
            }
        }
Example #2
0
        public static void ForceCloseSquadWarScreen()
        {
            if (Service.Get <WorldTransitioner>().IsTransitioning())
            {
                return;
            }
            SquadWarScreen highestLevelScreen = Service.Get <ScreenController>().GetHighestLevelScreen <SquadWarScreen>();

            if (highestLevelScreen != null)
            {
                highestLevelScreen.Close(null);
            }
        }
Example #3
0
 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();
     }
 }
Example #4
0
        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);
            }
        }