Beispiel #1
0
        public void LoadSimpleGameConfig(string gameNameTag)
        {
            if (currentGameTypeConfig == null)
            {
                return;
            }

            var games      = CurrentGameLobbyConfig.games;
            int foundIndex = Array.FindIndex(games, curGame => curGame.gameNameTag == gameNameTag);

            if (foundIndex != -1)
            {
                currentSimpleGameConfig = currentGameTypeConfig.LoadSimpleGameConfig(games[foundIndex].gameConfigInResources);
            }
        }
Beispiel #2
0
        public void LoadGameTypeConfig(LobbyGamesConfig lobbyGameConfig)
        {
            if (currentGameTypeConfig != null && currentGameTypeConfig.gameType != lobbyGameConfig.gameType)
            {
                currentGameTypeConfig = null;
            }
            else if (currentGameTypeConfig != null && currentGameTypeConfig.gameType == lobbyGameConfig.gameType)
            {
                return;
            }

            if (lobbyGameConfig.gameType == CasinoGameType.Slots)
            {
                currentGameTypeConfig = Resources.Load <SlotsGameConfig>(lobbyGameConfig.mainGameConfigInResources);
            }

            currentSimpleGameConfig = null;
        }
Beispiel #3
0
 public void ClearCurrentGameConfigs()
 {
     currentGameTypeConfig   = null;
     currentSimpleGameConfig = null;
 }