Пример #1
0
        public static void gameOver(string gameOverText, bool sendTCPGameOver = false)
        {
            string buttonText = CurrentTournament.isInTournament ? "To Tournament" : "Return to lobby";

            Action buttonAction;

            if (CurrentTournament.isInTournament)
            {
                buttonAction = () => { CurrentTournament.reOpenTournament(); }
            }
            ;
            else
            {
                buttonAction = () => { ClientUIStateManager.requestGotoState(ClientUIStates.GameLobby); }
            };

            AlbotDialogBox.setGameOver();
            AlbotDialogBox.activateButton(buttonAction, DialogBoxType.GameState, gameOverText, buttonText, 70, 25);
        }
Пример #2
0
        //Retreive information the server if we could login or not
        private void handleLoginCallback(bool couldLogin, string msg)
        {
            loadingScreen.closeLoadingScreen();
            if (waitingForLoginResponse == false)
            {
                return;
            }

            if (couldLogin == false)
            {
                AlbotDialogBox.activateButton(() => { }, DialogBoxType.BotConnectionError, msg, "Ok!", 30, 30);
                resetToNormalState();
                return;
            }

            //gameObject.SetActive(false);
            waitingForLoginResponse = false;
            if (LoggedIn != null)
            {
                LoggedIn.Invoke();
            }
        }