Exemplo n.º 1
0
		void Awake(){

			TaskManager.instance_ = this;
			if (_runner == null) {
				_runner = this.gameObject.GetComponent<TaskRunner>();			
			}
			if (_runner == null) {
				_runner = this.gameObject.AddComponent<TaskRunner>();	
			}
		}
Exemplo n.º 2
0
 public static Task Back(this Task task, GDGeek.TaskShutdown frontTask)
 {
     TaskManager.PushBack(task, frontTask);
     return(task);
 }
Exemplo n.º 3
0
 public static Task Front(this Task task, GDGeek.TaskInit frontTask)
 {
     TaskManager.PushFront(task, frontTask);
     return(task);
 }
Exemplo n.º 4
0
 public static void Run(Task task)
 {
     if(TaskManager.GetInstance() == null){
         GameObject obj = new GameObject ();
         obj.name = "TaskManager";
         instance_ = obj.AddComponent<TaskManager> ();
     }
     TaskManager.GetInstance().runner.addTask(task);
 }