public override void End() { if(taskMgrInstance != null) { tasksPool.Clear(); tasksPool = null; taskMgrInstance = null; Destroy(gameObject); } }
public override void Init() { if(taskMgrInstance == null) { UnityEngine.Debug.Log ("[TaskMgr INIT]"); tasksPool = new List<CoroutineTask>(); DontDestroyOnLoad(gameObject); taskMgrInstance = this; } }
public CoroutineTask(IEnumerator coroutine) { this.coroutine = coroutine; this.taskManager = TaskMgr.Instance; this.taskManager.Add(this); }