static public int set_onCompleteHandler(IntPtr l) { try { LResUpdate self = (LResUpdate)checkSelf(l); UnityEngine.Events.UnityAction v; int op = LuaDelegation.checkDelegate(l, 2, out v); if (op == 0) { self.onCompleteHandler = v; } else if (op == 1) { self.onCompleteHandler += v; } else if (op == 2) { self.onCompleteHandler -= v; } pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int checkUpdate(IntPtr l) { try { LResUpdate self = (LResUpdate)checkSelf(l); self.checkUpdate(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
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"); } }