コード例 #1
0
ファイル: Match.cs プロジェクト: Renanse/gameup-unity-sdk
        internal ActiveGamers(JsonArray dict)
        {
            JsonArray activeGamersArray = (JsonArray) dict;
              Gamers = new List<ActiveGamer>();
              foreach (JsonObject gamerPair in activeGamersArray) {
            object nickname;
            gamerPair.TryGetValue("nickname", out nickname);
            object gamerId;
            gamerPair.TryGetValue("gamer_id", out gamerId);

            ActiveGamer activeGamer = new ActiveGamer(gamerId.ToString(), nickname.ToString());
            Gamers.Add(activeGamer);
              }
        }
コード例 #2
0
        internal ActiveGamers(JsonArray dict)
        {
            JsonArray activeGamersArray = (JsonArray)dict;

            Gamers = new List <ActiveGamer>();
            foreach (JsonObject gamerPair in activeGamersArray)
            {
                object nickname;
                gamerPair.TryGetValue("nickname", out nickname);
                object gamerId;
                gamerPair.TryGetValue("gamer_id", out gamerId);

                ActiveGamer activeGamer = new ActiveGamer(gamerId.ToString(), nickname.ToString());
                Gamers.Add(activeGamer);
            }
        }