Exemplo n.º 1
0
        public override void End()
        {
            if(taskMgrInstance != null)
            {
                tasksPool.Clear();
                tasksPool = null;

                taskMgrInstance = null;
                Destroy(gameObject);
            }
        }
Exemplo n.º 2
0
        public override void Init()
        {
            if(taskMgrInstance == null)
            {
                UnityEngine.Debug.Log ("[TaskMgr INIT]");
                tasksPool = new List<CoroutineTask>();

                DontDestroyOnLoad(gameObject);

                taskMgrInstance = this;
            }
        }
Exemplo n.º 3
0
 public CoroutineTask(IEnumerator coroutine)
 {
     this.coroutine = coroutine;
     this.taskManager = TaskMgr.Instance;
     this.taskManager.Add(this);
 }