Beispiel #1
0
 public void UnRegisterEventCallBack(UnityNetwork.CallbackNetState a_cbSuccess, UnityNetwork.CallbackNetState a_cbFail, UnityNetwork.CallbackNetState a_cbClose)
 {
     if (Net == null)
     {
         return;
     }
     Net.UnRegisterEventCallBack(a_cbSuccess, a_cbFail, a_cbClose);
 }
Beispiel #2
0
 public void UnRegisterEventCallBack(UnityNetwork.CallbackNetState a_cbSuccess, UnityNetwork.CallbackNetState a_cbFail, UnityNetwork.CallbackNetState a_cbClose)
 {
     UnityUtility.CTrace.Singleton.debug("UnRegisterEventCallBack");
     if (CGameClient.Singleton == null)
     {
         return;
     }
     ConnectRequestSuccess -= a_cbSuccess;
     ConnectRequestFail    -= a_cbFail;
     NetLinkClose          -= a_cbClose;
 }
Beispiel #3
0
        public void Init()
        {
            CGameClient.Singleton.MsgExecMgr.AddParseMsgCb(typeof(CMsgLoginSystemLG2GCAckAccountLogin), new UnityFrame.CMsgExecMgr.ParseMessageCallback(OnMsgLoginSystemLG2GCAckAccountLogin));
            CGameClient.Singleton.MsgExecMgr.AddParseMsgCb(typeof(CMsgLoginSystemGM2GCAckAccountLogin), new UnityFrame.CMsgExecMgr.ParseMessageCallback(OnMsgLoginSystemGM2GCAckAccountLogin));
            CGameClient.Singleton.MsgExecMgr.AddParseMsgCb(typeof(CMsgLoginSystemLG2GCAckRegisterAccount), new UnityFrame.CMsgExecMgr.ParseMessageCallback(OnMsgLoginSystemLG2GCAckRegisterAccount));
            CGameClient.Singleton.MsgExecMgr.AddParseMsgCb(typeof(CMsgLoginSystemLG2GCAckGetAccountToken), new UnityFrame.CMsgExecMgr.ParseMessageCallback(OnMsgLoginSystemLG2GCAckGetAccountToken));

            m_cbConnectServerSuccess = new UnityNetwork.CallbackNetState(OnServerConnectSuccess);
            m_cbConnectServerFail = new UnityNetwork.CallbackNetState(OnServerConnectFail);
            m_cbConnectServerClose = new UnityNetwork.CallbackNetState(OnServerConnectClose);
            CGameClient.Singleton.RegisterEventCallBack(m_cbConnectServerSuccess, m_cbConnectServerFail, m_cbConnectServerClose);
        }
Beispiel #4
0
        public void RegisterEventCallBack(UnityNetwork.CallbackNetState a_cbSuccess, UnityNetwork.CallbackNetState a_cbFail, UnityNetwork.CallbackNetState a_cbClose)
        {
            UnityUtility.CTrace.Singleton.debug("RegisterEventCallBack");
            if (IsCallbackReady())
            {
                UnRegisterEventCallBack(a_cbSuccess, a_cbFail, a_cbClose);
            }

            ConnectRequestSuccess += a_cbSuccess;
            ConnectRequestFail    += a_cbFail;
            NetLinkClose          += a_cbClose;
        }