Beispiel #1
0
        //Allows for special commands that can be used by holding one of these keys down while right clicking.
        private bool panicCommand()
        {
            if (Input.GetKey(KeyCode.X))  //Cool force restart
            {
                AdminRunningTournamentManager.forceRestartRoundLobby(id);
                return(true);
            }


            if (Input.GetKey(KeyCode.Alpha3))  //Reconnect top player in round
            {
                AdminRunningTournamentManager.reConnectPlayer(playerSlots[0].username);
                return(true);
            }
            if (Input.GetKey(KeyCode.Alpha4))  //Reconnect bot player in round
            {
                AdminRunningTournamentManager.reConnectPlayer(playerSlots[1].username);
                return(true);
            }

            if (Input.GetKey(KeyCode.Alpha1))
            {
                AdminRunningTournamentManager.forceIndexWinner(id, 0);
                return(true);
            }
            if (Input.GetKey(KeyCode.Alpha2))
            {
                AdminRunningTournamentManager.forceIndexWinner(id, 1);
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        private void adminRightClick()
        {
            if (TournamentTest.isTraining)
            {
                TournamentTest.playGame(id.col, id.row);
                return;
            }

            if (panicCommand())
            {
                return;
            }

            if (state == RoundState.Lobby)
            {
                if (serverRound.canStartGame())
                {
                    AdminRunningTournamentManager.startRoundGame(id);
                }
            }
            else if (state == RoundState.Idle && serverRound.hasAllPlayers())
            {
                AdminRunningTournamentManager.startRoundLobby(id);
            }
        }
Beispiel #3
0
 private void adminLeftClick()
 {
     if (state == RoundState.Lobby || state == RoundState.Playing)
     {
         AdminRunningTournamentManager.onStartSpectating();
         AdminUpdateManager.startSpectateGame(preGameRoomID);
     }
 }
Beispiel #4
0
 private void initClicks()
 {
     if (AdminRunningTournamentManager.isAdmin() || TournamentTest.isTraining)
     {
         leftClick = adminLeftClick; rightClick = adminRightClick;
     }
     else
     {
         leftClick = clientLeftClick; rightClick = clientRightClick;
     }
 }