예제 #1
0
        public void createLobby(int businessId)
        {
            this.count++;
            HorseRace raceLobby = new HorseRace();

            raceLobby.manager = this;
            raceLobby.setupId(businessId);
            this.lobbies.Add(raceLobby);
        }
예제 #2
0
        public void Event_OnClientRequestPanel(Player player)
        {
            int lobbyId = player.GetData <int>("HorseRace:Lobby");

            if (lobbyId != CONSTANTS.NO_LOBBY_IDENTIFIER)
            {
                HorseRace lobbyInstance = this.lobbies.Find(lobby => lobby.id == lobbyId);
                if (lobbyInstance != null)
                {
                    player.TriggerEvent("HorseRace:openPanel", lobbyInstance.isBusinessEmployee(player) ? "owner" : "casual", lobbyInstance.inProgress);
                }
            }
        }