/// <summary> /// 添加动作事件 /// </summary> /// <param name="actEvent"></param> public void AddEvent(ActEvent actEvent) { if (null != actEvent) { if (this.m_queueActEvent.Count == 0) { actEvent.Start(); } this.m_queueActEvent.Enqueue(actEvent); } }
private void UpdateQueue(Queue <ActEvent> queueActEvent) { if (queueActEvent != null && queueActEvent.Count != 0) { ActEvent actEvent = queueActEvent.Peek(); if (null != actEvent) { if (actEvent.IsOver()) { actEvent = queueActEvent.Dequeue(); actEvent.Dispose(); if (queueActEvent.Count > 0) { actEvent = queueActEvent.Peek(); if (null != actEvent) { actEvent.Start(); } } } } } }