Esempio n. 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();
            }
        }
Esempio n. 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;
 }
Esempio n. 3
0
 //-------------------------------------------------------------------------
 public void cancelTask()
 {
     CancelTask = true;
     ListFTask.Clear();
     ListDoneTask.Clear();
 }