protected override void OnApplicationQuit() { if (luaMnager.IsLuaEnv()) { luaMnager.LuaStop(); } luaMnager.Close(); }
/// <summary> /// 析构函数 /// </summary> void OnDestroy() { if (mLuaManager != null) { mLuaManager.CallFunction("KBEngineLua.Destroy"); mLuaManager.Close(); } Debug.Log("~GameManager was destroyed"); }
/// <summary> /// 析构函数 /// </summary> void OnDestroy() { if (NetManager != null) { NetManager.Unload(); } if (LuaManager != null) { LuaManager.Close(); } Debug.Log("~GameManager was destroyed"); }
///// <summary> ///// 当从池子里面获取时 ///// </summary> ///// <param name="obj"></param> //void OnPoolGetElement(TestObjectClass obj) //{ // Debug.Log("OnPoolGetElement--->>>" + obj); //} ///// <summary> ///// 当放回池子里面时 ///// </summary> ///// <param name="obj"></param> //void OnPoolPushElement(TestObjectClass obj) //{ // Debug.Log("OnPoolPushElement--->>>" + obj); //} /// <summary> /// 析构函数 /// </summary> void OnDestroy() { Util.CallMethod("Game", "OnDestroy"); //初始化完成 if (NetManager != null) { NetManager.Unload(); } if (LuaManager != null) { LuaManager.Close(); } //Debug.Log("~GameManager was destroyed"); }
static int Close(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaManager obj = (LuaManager)ToLua.CheckObject <LuaManager>(L, 1); obj.Close(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// 析构函数 /// </summary> void OnDestroy() { LuaManager lurMgr = AppFacade.Instance.GetManager <LuaManager>(ManagerName.Lua); if (lurMgr != null) { lurMgr.Close(); } if (AppFacade.Instance.networkManager != null) { AppFacade.Instance.networkManager.Close(); } LogCenter.Instance().Close(); Util.Log("Game", "~Main was destroyed"); }
private static int Close(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 1); LuaManager luaManager = (LuaManager)ToLua.CheckObject(L, 1, typeof(LuaManager)); luaManager.Close(); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }