DoEvent() public abstract method

public abstract DoEvent ( NFGUID self, int nEventID, NFIDataList valueList ) : void
self NFGUID
nEventID int
valueList NFIDataList
return void
Exemplo n.º 1
0
        private void EGMI_ACK_ENTER_GAME(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.MsgData);

            Debug.Log("EGMI_ACK_ENTER_GAME " + xData.EventCode.ToString());

            mEventModule.DoEvent((int)NFLoginModule.Event.EnterGameSuccess);
            //mSceneModule.LoadScene((int)xData.event_code);
            //可以播放过图动画场景
        }
Exemplo n.º 2
0
        private void NetEventDelegation(NFNetEventType eventType)
        {
            Debug.Log(Time.realtimeSinceStartup.ToString() + " " + eventType.ToString());

            switch (eventType)
            {
            case NFNetEventType.Connected:
                mEventModule.DoEvent((int)NFLoginModule.Event.Connected);
                break;

            case NFNetEventType.Disconnected:
                mEventModule.DoEvent((int)NFLoginModule.Event.Disconnected);
                break;

            case NFNetEventType.ConnectionRefused:
                mEventModule.DoEvent((int)NFLoginModule.Event.ConnectionRefused);
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
        // 接收消息
        private void OnLoginProcess(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase        xMsg  = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckEventResult xData = NFMsg.AckEventResult.Parser.ParseFrom(xMsg.msg_data);

            if (EGameEventCode.EGEC_ACCOUNT_SUCCESS == xData.event_code)
            {
                Debug.Log("Login  SUCCESS");
                mEventModule.DoEvent((int)NFLoginModule.Event.LoginSuccess);
            }
            else
            {
                Debug.Log("Login Faild,Code: " + xData.event_code);
                NFDataList varList = new NFDataList();
                varList.AddInt((Int64)xData.event_code);
                mEventModule.DoEvent((int)NFLoginModule.Event.LoginFailure);
            }
        }