Esempio n. 1
0
        /// <summary>
        /// Add Corourine Task to CoroutineScheduler, and return Coroutine Task Entity
        /// </summary>
        /// <param name="_mono">the target monobehaviour</param>
        /// <param name="_key">store key</param>
        /// <param name="_coroutine">coroutine entity</param>
        /// <param name="_delay">delay time, 0 means wait no time</param>
        /// <param name="_onFinish">call when every time finish the corourine</param>
        /// <returns></returns>
        public CoroutineTask AddCoroutineTask(MonoBehaviour _mono, string _key, IEnumerator _coroutine, float _delay, Action <bool> _onFinish = null)
        {
            CoroutineTask _task = new CoroutineTask(_mono, _coroutine, _delay, _onFinish);

            m_CoRouter.AddEntity(_key, _task);
            return(_task);
        }
Esempio n. 2
0
 /// <summary>
 /// Pause corourine task
 /// </summary>
 /// <param name="_key"></param>
 public void PauseCoroutineTask(string _key)
 {
     m_HandleTask = m_CoRouter.GetEntity(_key);
     if (m_HandleTask != null)
     {
         m_HandleTask.Pause();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// start corourine task
 /// </summary>
 /// <param name="_key"></param>
 public void StartCoroutineTask(string _key)
 {
     m_HandleTask = m_CoRouter.GetEntity(_key);
     if (m_HandleTask != null)
     {
         m_HandleTask.Start();
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Kill corourine task
 /// </summary>
 /// <param name="_key"></param>
 public void KillCoroutineTask(string _key)
 {
     m_HandleTask = m_CoRouter.GetEntity(_key);
     if (m_HandleTask != null)
     {
         m_HandleTask.Kill();
     }
 }