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); } }
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; }
public void ClearCurrentGameConfigs() { currentGameTypeConfig = null; currentSimpleGameConfig = null; }