Пример #1
0
 private void OnLobbyFindResponse(Action <RuyiNetLobby[]> callback, RuyiNetLobbyFindResponse response)
 {
     if (callback != null)
     {
         var lobbies = response.GetLobbies();
         callback(lobbies);
     }
 }
Пример #2
0
        private void OnLobbyFindResponse(Action <RuyiNetLobby[]> callback, RuyiNetLobbyFindResponse response)
        {
            if (callback != null)
            {
                var results = response.data.lobbies;
                var lobbies = new RuyiNetLobby[results.Length];
                for (int i = 0; i < results.Length; ++i)
                {
                    lobbies[i] = new RuyiNetLobby(results[i]);
                }

                callback(lobbies);
            }
        }