コード例 #1
0
 public void CheckDoneOnUpdate()
 {
     if (onUpdateTasks.Count == 0)
     {
         return;
     }
     foreach (var taskId in onUpdateTasks)
     {
         if (goTasks.ContainsKey(taskId))
         {
             GoCallback task = goTasks[taskId];
             if (!task.Canceled)
             {
                 if (task.Asset != null)
                 {
                     DoInstant(taskId, task.Asset);
                 }
                 else
                 {
                     GameObject go = DoGetFromUnused(task.Path);
                     task.Do(go);
                 }
             }
         }
     }
     onUpdateTasks.Clear();
 }
コード例 #2
0
 private void FinishInstant(ulong gcbId, GameObject go)
 {
     if (goTasks.ContainsKey(gcbId))
     {
         GoCallback task = goTasks[gcbId];
         task.Do(go);
         GoCallback.Remove(gcbId);
         goTasks.Remove(gcbId);
     }
     if (instanters.ContainsKey(gcbId))
     {
         instanters.Remove(gcbId);
     }
 }