Пример #1
0
    public async void LoadGameList()
    {
        ClearErrorText();

        try
        {
            var response = await ApiWrapper.GameList();

            Game.ClearCache();

            var games = (JArray)response;
            gameList = new List <Game>(games.Count);
            foreach (var game in games)
            {
                gameList.Add(Game.GetGame(game));
            }

            Initialize();
        }
        catch (Exception e)
        {
            Debug.Log(e);
        }
    }