コード例 #1
0
ファイル: FrameScene.cs プロジェクト: tuita520/Frame
    public void RegisterReceiver()
    {
        #region Event
        EventDispatch.RegisterReceiver <int>(EventID.Ready_Request, OnReadyRequest);
        EventDispatch.RegisterReceiver <EventConnect>(EventID.Connect_Request, OnConnectRequest);
        EventDispatch.RegisterReceiver <Command>(EventID.AddCommand, OnAddCommand);
        #endregion
        #region Message
        MessageDispatch.RegisterReceiver <GM_Accept>(MessageID.GM_ACCEPT_SC, OnAccept);
        MessageDispatch.RegisterReceiver <GM_Connect>(MessageID.GM_CONNECT_SC, OnConnectReturn);
        MessageDispatch.RegisterReceiver <GM_Connect>(MessageID.GM_CONNECT_BC, OnConnectBC);
        MessageDispatch.RegisterReceiver <GM_Disconnect>(MessageID.GM_DISCONNECT_BC, OnDisconnectBC);
        MessageDispatch.RegisterReceiver <GM_Ready>(MessageID.GM_READY_BC, OnReadyBC);
        MessageDispatch.RegisterReceiver <GM_Begin>(MessageID.GM_BEGIN_BC, OnBeginBC);
        MessageDispatch.RegisterReceiver <GM_Frame_BC>(MessageID.GM_FRAME_BC, OnFrameBC);
        MessageDispatch.RegisterReceiver <GM_Return>(MessageID.GM_PING_SC, OnPingReturn);
        #endregion

        #region Command
        CommandDispatch.RegisterReceiver <CMD_ReleaseSkill>(CommandID.RELEASE_SKILL, OnCommandReleaseSkill);
        CommandDispatch.RegisterReceiver <CMD_MoveToPoint>(CommandID.MOVE_TO_POINT, OnCommandMoveToPoint);
        CommandDispatch.RegisterReceiver <CMD_CreateMonster>(CommandID.CREATE_MONSTER, OnCreateMonster);

        #endregion
    }
コード例 #2
0
ファイル: UI_Main.cs プロジェクト: tuita520/Frame
 public void RegisterReceiver()
 {
     EventDispatch.RegisterReceiver <int>(EventID.Connect_Return, OnConnectReturn);
     EventDispatch.RegisterReceiver <int>(EventID.Ready_Broadcast, OnReadyBC);
     EventDispatch.RegisterReceiver <bool>(EventID.Begin_Broadcast, OnBeginBC);
     EventDispatch.RegisterReceiver <EventPlayerCreate>(EventID.Player_Create, OnPlayerCreate);
     EventDispatch.RegisterReceiver <EventPlayerMove>(EventID.Player_Move, OnPlayerMove);
     EventDispatch.RegisterReceiver <EventPlayerRemove>(EventID.Player_Remove, OnPlayerRemove);
     EventDispatch.RegisterReceiver <EventPlayerBloodChange>(EventID.Player_BloodChange, OnPlayerBloodChange);
     EventDispatch.RegisterReceiver <long>(EventID.Frame_Broadcast, OnFrameBC);
     EventDispatch.RegisterReceiver <int>(EventID.Ping_Broadcast, OnPing);
 }