示例#1
0
        //-------------------------------------------------------------------------
        public void update(float tm)
        {
            foreach (var i in ListFTask)
            {
                if (i.Done())
                {
                    ListDoneTask.Add(i);
                }
                else
                {
                    i.update(tm);
                }
            }

            if (ListDoneTask.Count == ListFTask.Count)
            {
                IsAllDone = true;
                if (!CancelTask && AllTaskDoneCallBack != null)
                {
                    AllTaskDoneCallBack(MapParam);
                    AllTaskDoneCallBack = null;
                }
                ListDoneTask.Clear();
                ListFTask.Clear();
            }
        }
示例#2
0
 //-------------------------------------------------------------------------
 public void whenAll(Dictionary <byte, object> map_param, AllTaskDoneCallBack alltask_done_callback, params FTask[] task)
 {
     MapParam            = map_param;
     AllTaskDoneCallBack = alltask_done_callback;
     foreach (var i in task)
     {
         ListFTask.Add(i);
     }
     IsAllDone  = false;
     CancelTask = false;
 }
示例#3
0
 //-------------------------------------------------------------------------
 public void cancelTask()
 {
     CancelTask = true;
     ListFTask.Clear();
     ListDoneTask.Clear();
 }