/// <summary>
 ///  停止携程队列
 /// </summary>
 /// <param name="coroutineQueue"></param>
 public void StopCoroutineQueue(CoroutineQueue coroutineQueue)
 {
     foreach (var item in coroutineQueue.queue)
     {
         StopCoroutine(item.daly);
     }
     coroutineQueue.Destroy();
 }
        private IEnumerator m_ExecuteTimerQueue(CoroutineQueue coroutineQueue)
        {
            int i = 0;

            foreach (var item in coroutineQueue.queue)
            {
                i++;
                item.action();
                if (i != coroutineQueue.queue.Count)
                {
                    yield return(item.daly);
                }
                else
                {
                    coroutineQueue.Complete();
                    yield break;
                }
            }
        }
 /// <summary>
 ///  执行携程队列
 /// </summary>
 /// <param name="coroutineQueue"></param>
 public void ExecuteCoroutineQueue(CoroutineQueue coroutineQueue)
 {
     StartCoroutine(m_ExecuteTimerQueue(coroutineQueue));
 }
        /// <summary>
        ///  获取一个携程队列
        /// </summary>
        /// <returns></returns>
        public static CoroutineQueue CreateCoroutineQueue()
        {
            CoroutineQueue qe = new CoroutineQueue();

            return(qe);
        }