Beispiel #1
0
 // Token: 0x06005936 RID: 22838 RVA: 0x001EF7B4 File Offset: 0x001EDBB4
 private void FetchWorldFromApiQuery(Action <ApiWorld, ApiWorld.WorldInstance> onSuccess = null)
 {
     ApiWorld.FetchList(delegate(List <ApiWorld> worlds)
     {
         if (this.isShutdown)
         {
             Debug.Log(this.name + " was shutdown, ignoring query.");
             return;
         }
         worlds = (from w in worlds
                   where w != null && w.releaseStatus == "public"
                   select w).ToList <ApiWorld>();
         if (worlds.Count > 0)
         {
             ApiWorld.WorldInstance arg = this.ConfigurePortal(worlds[0]);
             if (onSuccess != null)
             {
                 onSuccess(worlds[0], arg);
             }
         }
         else
         {
             Debug.LogError("No worlds found in query for " + this.name);
         }
     }, delegate(string msg)
     {
         this.isValidWorld = false;
         Debug.LogWarning(msg);
     }, this.SortHeading, ApiWorld.SortOwnership.Any, this.SortOrder, this.Offset, 1, this.SearchTerm, null, UiWorldList.BuildExcludedTags(this.SortHeading, ApiWorld.SortOwnership.Any), string.Empty, ApiWorld.ReleaseStatus.Public, true);
 }
Beispiel #2
0
 // Token: 0x060061D0 RID: 25040 RVA: 0x00228220 File Offset: 0x00226620
 protected override void FetchAndRenderElements(int page)
 {
     this.timeUntilUpdate = float.PositiveInfinity;
     ApiWorld.ReleaseStatus releaseStatus = ApiWorld.ReleaseStatus.Public;
     if (this.sortOwnership == ApiWorld.SortOwnership.Mine)
     {
         releaseStatus = ApiWorld.ReleaseStatus.All;
     }
     ApiWorld.FetchList(delegate(List <ApiWorld> worlds)
     {
         this.timeUntilUpdate      = UnityEngine.Random.Range(15f, 20f);
         this.paginatedLists[page] = worlds.Cast <ApiModel>().ToList <ApiModel>();
         List <ApiWorld> list      = this.paginatedLists.SelectMany((KeyValuePair <int, List <ApiModel> > w) => w.Value).Cast <ApiWorld>().ToList <ApiWorld>();
         this.RenderElements <ApiWorld>(list, page);
     }, delegate(string err)
     {
         this.timeUntilUpdate = UnityEngine.Random.Range(5f, 10f);
     }, this.sortHeading, this.sortOwnership, this.sortOrder, this.numElementsPerPage * page, this.numElementsPerPage, this.searchQuery, this.tags.ToArray(), UiWorldList.BuildExcludedTags(this.sortHeading, this.sortOwnership), this.ownerId, releaseStatus, true);
 }