static int Close(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MyFrameWork.LuaManager obj = (MyFrameWork.LuaManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.LuaManager));
         obj.Close();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 析构函数
        /// </summary>
        void OnDestroy()
        {
            EventDispatcher.RemoveListener("OpponentReady", OnServerMatched);
            EventDispatcher.RemoveListener("MatchUIReady", OnMatchUIShowed);
            EventDispatcher.RemoveListener("MatchUICanceled", OnMatchUICanceled);
            EventDispatcher.RemoveListener("DelMatchedInfo", OnDelMatchedInfo);

            if (NetManager != null)
            {
                NetManager.Unload();
            }
            if (LuaManager != null)
            {
                LuaManager.Close();
            }

            DebugUtil.Info("~GameManager was destroyed");
        }