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

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