Esempio n. 1
0
        public void StartGame()
        {
            //GameKernel.GetResourceMgr().UnloadAllNormalResources();
            GameKernel.Shutdown();

            StartCoroutine(startGame());
        }
Esempio n. 2
0
 public static void Shutdown()
 {
     if (_instance)
     {
         _instance.DoShutdown();
         _instance = null;
     }
 }
Esempio n. 3
0
        public static void Create()
        {
            Shutdown();

            _instance = (new GameObject(GameKernelGOName)).AddComponent <GameKernel>();
            GameObject.DontDestroyOnLoad(_instance.gameObject);

            _instance.DoCreate();
        }
Esempio n. 4
0
        /// <summary>
        /// 加载完成
        /// </summary>
        IEnumerator startGame()
        {
            LuaInterface.Debugger.Log("开始游戏");
            // 创建游戏内核
            yield return(null);

            GameAppInstaller.CreateUIRoot();

            GameKernel.Create();
        }
Esempio n. 5
0
        public void ShowUpdateUI()
        {
            XYHY.IResourceMgr resMgr       = GameKernel.Get <XYHY.IResourceMgr>();
            Object            verUpdateObj = resMgr.LoadResidentMemoryObjSync(new AssetBundleParams("Prefabs/UI/VersionUpdate/version_update_ui", typeof(GameObject)));
            GameObject        verUpdateGo  = GameObject.Instantiate(verUpdateObj) as GameObject;

            DontDestroyOnLoad(verUpdateGo);
            verUpdateGo.transform.parent     = UICamera.mainCamera.transform;
            verUpdateGo.transform.localScale = Vector3.one;
        }