public void addTask(Task task) { task.init(); tasks_.Add(task); if (!running_) { running_ = true; time_ = DateTime.UtcNow; EditorApplication.update += editorUpdate; all_ = 0f; editorUpdate(); } }
/* * protected virtual void OnDestroy(){ * try{ * for(int i=0; i< this.tasks_.Count; ++i){ * Task task = this.tasks_[i] as Task; * task.shutdown(); * } * tasks_ = new ArrayList(); * }catch(System.Exception e){ * Debug.LogWarning(e.Message); * } * }*/ public void addTask(Task task) { task.init(); this.tasks_.Add(task); }
/* protected virtual void OnDestroy(){ try{ for(int i=0; i< this.tasks_.Count; ++i){ Task task = this.tasks_[i] as Task; task.shutdown(); } tasks_ = new ArrayList(); }catch(System.Exception e){ Debug.LogWarning(e.Message); } }*/ public void addTask(Task task){ task.init(); this.tasks_.Add(task); }