public static LFPSView Show() { if (_instance == null) { GameObject obj = new GameObject(); obj.name = "LFPSView"; _instance = obj.AddComponent <LFPSView>(); DontDestroyOnLoad(obj); } return(_instance); }
public static LFPSView Show() { if (_instance == null) { GameObject obj = new GameObject(); obj.name = "LFPSView"; _instance = obj.AddComponent<LFPSView>(); DontDestroyOnLoad(obj); } return _instance; }
void complete() { if (LGameConfig.GetInstance().isShowFps) { LFPSView.Show(); } if (!LGameConfig.GetInstance().isDebug) //生产环境 { if (LGameConfig.GetInstance().isHotFix) { GameObject canvas = GameObject.Find("Canvas"); Text lab_unzip = null; if (canvas.transform.Find("prog")) { canvas.transform.Find("prog").gameObject.SetActive(true); lab_unzip = canvas.transform.Find("prog/lab_unzip").GetComponent <Text>(); } GameObject obj = new GameObject(); obj.name = "ResUpdate"; LResUpdate resUpdate = obj.AddComponent <LResUpdate> (); resUpdate.onUnzipProgressHandler = (int step) => { if (lab_unzip) { lab_unzip.text = step.ToString(); } Debug.Log(" unzip " + step); }; resUpdate.onCompleteHandler = () => { Destroy(obj); LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab", "@luaconfig.ab" }, () => { _l.start("main"); }); }; resUpdate.checkUpdate(); } else { LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab", "@luaconfig.ab" }, () => { _l.start("main"); }); } } else //PC端开发 { _l.start("main"); } }
void complete() { LFPSView.Show(); if (!LGameConfig.GetInstance().isDebug) //生产环境 { GameObject obj = new GameObject(); obj.name = "ResUpdate"; LResUpdate resUpdate = obj.AddComponent <LResUpdate>(); resUpdate.onCompleteHandler = () => { Destroy(obj); _l.start("main"); }; resUpdate.checkUpdate(); } else { _l.start("main"); } }
void complete() { if (LGameConfig.GetInstance().isShowFps) { LFPSView.Show(); } if (!LGameConfig.GetInstance().isDebug) //生产环境 { if (LGameConfig.GetInstance().isHotFix) { GameObject obj = new GameObject(); obj.name = "ResUpdate"; LResUpdate resUpdate = obj.AddComponent <LResUpdate> (); resUpdate.onCompleteHandler = () => { Destroy(obj); LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab" }, () => { _l.start("main"); }); }; resUpdate.checkUpdate(); } else { LLoadBundle.GetInstance().LoadAllBundles(new string[] { "@lua.ab" }, () => { _l.start("main"); }); } } else //PC端开发 { _l.start("main"); } }