public void StartGame() { //GameKernel.GetResourceMgr().UnloadAllNormalResources(); GameKernel.Shutdown(); StartCoroutine(startGame()); }
public static void Shutdown() { if (_instance) { _instance.DoShutdown(); _instance = null; } }
public static void Create() { Shutdown(); _instance = (new GameObject(GameKernelGOName)).AddComponent <GameKernel>(); GameObject.DontDestroyOnLoad(_instance.gameObject); _instance.DoCreate(); }
/// <summary> /// 加载完成 /// </summary> IEnumerator startGame() { LuaInterface.Debugger.Log("开始游戏"); // 创建游戏内核 yield return(null); GameAppInstaller.CreateUIRoot(); GameKernel.Create(); }
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; }