示例#1
0
 private void Awake()
 {
     ForegroundInvoker.Initialize().transform.parent = this.transform;
     ForegroundProcessor.Initialize().transform.parent = this.transform;
     BackgroundProcessor.Initialize();
     DontDestroyOnLoad(this.gameObject);
 }
示例#2
0
        /// <summary>
        /// 初始化
        /// </summary>
        internal static GameObject Initialize()
        {
            if (g_instance != null)
            {
                return(g_instance.gameObject);
            }
            GameObject go = new GameObject();

            go.name    = "ForegroundProcessor";
            g_instance = go.AddComponent <ForegroundProcessor>();
            return(go);
        }
示例#3
0
 private void OnApplicationQuit()
 {
     ForegroundInvoker.Exit();
     ForegroundProcessor.Exit();
     BackgroundProcessor.Exit();
 }