예제 #1
0
 public void addTask(Task task)
 {
     task.init();
     tasks_.Add(task);
     if (!running_)
     {
         running_ = true;
         time_    = DateTime.UtcNow;
         EditorApplication.update += editorUpdate;
         all_ = 0f;
         editorUpdate();
     }
 }
예제 #2
0
        /*
         * 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);
        }
예제 #3
0
파일: TaskRunner.cs 프로젝트: CzDreamer/eat
		/*
		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);
		}