Exemplo n.º 1
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");
        }
Exemplo n.º 2
0
 void OnDestroy()
 {
     EventDispatcher.RemoveListener(SDK_LOGIN_SWITCH_CBK, OnSwitchCallback);
 }