Exemple #1
0
        private static void TCPStatusChanged(ConnectionStatus status)
        {
            if (ClientUIOverlord.currentState != ClientUIStates.PlayingGame || CurrentTournament.isInTournament)
            {
                return;
            }

            if (status == ConnectionStatus.Connected)
            {
                restartCurrentGame();
            }
            if (status == ConnectionStatus.Disconnected && ClientUIOverlord.currentState == ClientUIStates.PlayingGame)
            {
                TCPLocalConnection.restartServer();
            }
        }
Exemple #2
0
        private static void onBotConnected(ConnectionStatus status)
        {
            if (status == ConnectionStatus.Disconnected)
            {
                TCPLocalConnection.restartServer();
                return;
            }

            if (status != ConnectionStatus.Connected)
            {
                return;
            }

            onStartFunc();
            TCPLocalConnection.sendMessage(currentGameType + " API session started.");
        }
    private void TCPStatusChanged(ConnectionStatus status)
    {
        if (ClientUI.ClientUIOverlord.currentState != ClientUI.ClientUIStates.PlayingGame)
        {
            return;
        }

        if (status == ConnectionStatus.Connected)
        {
            if (restartGame != null)
            {
                restartGame();
                print("Activated Restart");
            }
        }
        else if (status == ConnectionStatus.Disconnected || status == ConnectionStatus.None)
        {
            TCPLocalConnection.restartServer();
        }
    }
 public void restartButtonPressed()
 {
     TCPLocalConnection.restartServer();
     moveQ.Clear();
     restartGame();
 }