private static void onUiStateChanged(ClientUIStates newState) { if (isSpectating && newState != ClientUIStates.PlayingGame) { stopSpectating(); } }
private static void UIStateChanged(ClientUIStates state) { if (state == ClientUIStates.GameLobby) { stopSinglePlayerGame(); } }
private void onUIChanged(ClientUIStates state) { if (state != ClientUIStates.PlayingGame) { gameOver = false; } }
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); } }
private static void UIStateChanged(ClientUIStates state) { if (currentlyPlayingGame && state != ClientUIStates.PlayingGame) { Msf.Connection.SendMessage((short)ServerCommProtocl.PlayerLeftPreGame, gameSpecs.roomID); currentlyPlayingGame = false; } }
private void onUiStateChanged(ClientUIStates newState) { if (isCurrentlyInChat && isInLobby(newState) == false) exitChat(); else if (isCurrentlyInChat == false && isInLobby(newState)) enterChat(); isCurrentlyInChat = isInLobby(newState); }
private void UIStateChanged(ClientUIStates state) { if (state != ClientUIStates.PlayingGame && playingGame) { onLeftGame(); } else if (state == ClientUIStates.PlayingGame) { playingGame = true; } }
public static void requestGotoState(ClientUIStates newState, Action onLoad = null) { onLoadActions.Clear(); if (onLoad != null) { onLoadActions.Add(onLoad); } singleton.setUIState(newState); if (SceneManager.GetActiveScene().name != statesToScenes[newState]) { SceneManager.LoadScene(statesToScenes[newState]); } }
public static void setUIState(ClientUIStates state) { switch (state) { case ClientUIStates.LobbyBrowser: setMenuPanels(false, true, false); setLobbyPanels(false, true, false); break; case ClientUIStates.GameLobby: setMenuPanels(false, true, false); setLobbyPanels(true, false, false); currentAcountInfo = Msf.Client.Auth.AccountInfo; break; case ClientUIStates.PreGame: setMenuPanels(false, true, false); setLobbyPanels(false, false, false); break; case ClientUIStates.LoginMenu: setMenuPanels(true, false, false); setLobbyPanels(false, false, false); break; case ClientUIStates.PreTournament: setMenuPanels(false, false, false); setLobbyPanels(false, false, true); break; case ClientUIStates.PlayingTournament: case ClientUIStates.PlayingGame: setMenuPanels(false, false, false); setLobbyPanels(false, false, false); break; } if (state != ClientUIStates.PlayingGame) { dissconnectFromGameRoom(); } currentState = state; if (onUIStateChanged != null) { onUIStateChanged.Invoke(state); } }
public void UIStateChanged(ClientUIStates newState) { if (newState == ClientUIStates.LoginMenu) { stateSwitch(MenuBarState.noInfoNorProfile); } else if (newState == ClientUIStates.GameLobby) { stateSwitch(MenuBarState.noInfo); } else { stateSwitch(MenuBarState.allActive); } }
private void onUiStateChanged(ClientUIStates state) { bool exitedChat = false, enteredChat = false; if (state == ClientUIStates.GameLobby || state == ClientUIStates.PreGame) { if (isCurrentlyInChat == false) { enteredChat = true; isCurrentlyInChat = true; } } else if (isCurrentlyInChat) { exitedChat = true; isCurrentlyInChat = false; } AccountInfoPacket currentAcountInfo = ClientUIOverlord.getCurrentAcountInfo(); AlbotChatMsg msg = new AlbotChatMsg() { icon = int.Parse(currentAcountInfo.Properties [AlbotDictKeys.icon]), username = currentAcountInfo.Username }; if (enteredChat) { for (int i = MessagesList.transform.childCount; i > 1; i--) { Destroy(MessagesList.transform.GetChild(i - 1).gameObject); } Msf.Connection.SendMessage((short)ServerCommProtocl.LobbyPlayerEnter, msg); } else if (exitedChat) { Msf.Connection.SendMessage((short)ServerCommProtocl.LobbyPlayerLeft, msg); clearList(); } }
private bool isInLobby(ClientUIStates state) { return state == ClientUIStates.GameLobby || state == ClientUIStates.LobbyBrowser || state == ClientUIStates.PreGame; }
private void UIStateChanged(ClientUIStates state) { logoutButton.gameObject.SetActive(state != ClientUIStates.LoginMenu); gameLobbyButton.gameObject.SetActive(state == ClientUIStates.PlayingGame || state == ClientUIStates.Stats); statsButton.gameObject.SetActive(state != ClientUIStates.LoginMenu || state == ClientUIStates.Stats); }