예제 #1
0
        private void setUIState(ClientUIStates state)
        {
            singleton.lobbyPanels.SetActive(state != ClientUIStates.PlayingGame);
            if (state != ClientUIStates.PlayingGame)
            {
                AdminUpdateManager.stopSpectating();
            }

            switch (state)
            {
            case ClientUIStates.GameLobby:
                singleton.setPanelStates(false, true);
                break;

            case ClientUIStates.LoginMenu:
                singleton.setPanelStates(true, false);
                break;

            case ClientUIStates.PlayingTournament:
            case ClientUIStates.Stats:
                singleton.setPanelStates(false, false);
                break;
            }


            if (onAdminUIStateChanged != null)
            {
                onAdminUIStateChanged.Invoke(state);
            }
        }
 void Start()
 {
     Msf.Connection.SetHandler((short)CustomMasterServerMSG.spectateLogUpdate, handleUpdateMsg);
     Msf.Connection.SetHandler((short)CustomMasterServerMSG.spectateGameStarted, handleSpectateStartMsg);
     AdminUIManager.onAdminUIStateChanged += onUiStateChanged;
     singleton = this;
 }
예제 #3
0
        public void OnJoinGameClick()
        {
            GameType        selectedGameType = GameType.None;
            AdminListUiItem selected         = GetSelectedItem();

            if (selected == null || extractSelectedGameType(selected, ref selectedGameType) == false)
            {
                return;
            }

            AdminUpdateManager.startSpectateGame(selected.GameId);
        }