コード例 #1
0
 /// <summary>
 /// 静态消息响应函数
 /// </summary>
 public void StaticRegister()
 {
     foreach (var method in ExecuteAttribute.GetStaticExecuteMethod(Reflection.GetExecutingAssembly()))
     {
         RegisterMethod(method);
     }
 }
コード例 #2
0
ファイル: MessageDispatcher.cs プロジェクト: zuojiashun/src
        /// <summary>
        /// 静态消息响应函数
        /// </summary>
        public IEnumerator StaticRegisterAsync()
        {
#if UNITY_EDITOR
            var watch = new System.Diagnostics.Stopwatch();
            watch.Start();
#endif
            yield return(null);

            foreach (var method in ExecuteAttribute.GetStaticExecuteMethod(Reflection.GetExecutingAssembly()))
            {
                RegisterMethod(method);
                yield return(null);
            }
#if UNITY_EDITOR
            watch.Stop();
            UnityEngine.Debug.Log(string.Format("MessageDispatcher.StaticRegister: {0}s", watch.Elapsed.TotalSeconds));
#endif
        }