Пример #1
0
    public GamePLay(int gameMap, Match myMatch)
    {
        this.myMatch = myMatch;
        if (myMatch.matchType == MatchType.Tutorial)
        {
            currentTutorialPlayer = myMatch.currentPlayer;
            currentPlayerStage    = TutorialStage.Introduction;
            ServerSend.BeginTutorial(currentTutorialPlayer.GetPlayerId());
        }
        else
        {
            this.gameMap = (Map)gameMap;
            foreach (var player in myMatch.GetTeam1())
            {
                team1Zones.Add(player.GetPlayerId(), -1);
                gamePlayers.Add(new InternalPlayerMethods(1, player.GetPlayerId(), this.myMatch.MatchLobby.currentPick[player.GetPlayerId()], this));
            }
            foreach (var player in myMatch.GetTeam2())
            {
                team2Zones.Add(player.GetPlayerId(), -1);
                gamePlayers.Add(new InternalPlayerMethods(2, player.GetPlayerId(), this.myMatch.MatchLobby.currentPick[player.GetPlayerId()], this));
            }

            UpdateGamePlay     += UpdateMethod;
            FastUpdateGamePlay += FastUpdateMethod;
        }
    }