private void initManagerConfig() { m_UIRoot = ((Canvas)GameObject.FindObjectOfType(typeof(Canvas))).gameObject; if (!m_UIRoot) { Debug.LogError("UIManager 初始化失败,没有找到UI ROOT"); return; } // 初始化UI异步事件管理器 if (!m_SyncManager) { m_SyncManager = gameObject.AddComponent <UISyncManager>(); } // 初始化事件分发器 UIActionDispatcher.InitActionDispatcher(); }
private IEnumerator _ActionExcuter() { m_isExcuterRunning = true; while (m_RequestQueue.Count > 0) { UIActionRequest _action = m_RequestQueue.Dequeue(); On_RequestFinish = UIActionDispatcher.DispatchAction(_action.ActionOwner, _action.ActionType); yield return(new WaitForSeconds(_action.ActionDuring + QueueSnap)); if (On_RequestFinish != null) { On_RequestFinish(); } } m_isExcuterRunning = false; }