public MainView mView;//view public MainController() : base("MainView", "Windows/MainView/MainView") { SetModel <MainViewModel>(); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_OnGetGoldChang, OnGetRoomCardGlodsUpdate); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_GetPayBackInfo, OnGetPayBackInfo); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_OnNewMessageGet, OnNewMessageGet); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_OnNewMailShowRed, OnNewMailShowRed); }
public TenGameView mView;//view public TenGameController() : base("TenGameView", AssetsPathDic.TenGameView) { SetModel <TenModel>(); NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnGoldLess, NetOnGoldLess); //金币不足 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnRoomCardLess, NetOnRoomCardLess); //房卡不足 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnPlayerSeatDown, NetOnPlayerSeatDown); //有玩家坐下 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnPlayerLeave, NetOnPlayerLeave); //玩家离开 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnPlayerReady, NetOnPlayerReady); //玩家准备 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnPlayerOnOffLine, NetOnOnOffLine); //玩家上下线 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnGameTalk, NetOnGameTalk); //同步游戏聊天 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnGameStartLastTime, NetOnGameStartLastTime); //倒计时 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnGameStart, NetOnGameStart); //游戏开始 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnSelfGameOpt, NetOnSelfOpt); //自己获得操作指令 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnPlayerOptResult, NetOnPlayerOptResult); //玩家操作结果 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnChangZhuang, NetOnChangZhuang); //换庄 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnCastCard, NetOnCastCard); //发牌 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnSmallSettle, NetOnSmallSettle); //小结算 NetProcess.RegisterResponseCallBack(TenProtoIdMap.CMD_OnAutoChangDesk, NetOnAutoChangDesk); //自动换桌 }
private const string VOICE_INS_OTHER = "LZMJ/Other/"; //其他操作声音 public MJGameController() : base("GameUI", "Windows/Majiang/GameUI") { NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetGameStart, HandleStartGameData); //麻将游戏开始 发牌 NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetOnOptList, GetOnOptListACK); //同步 玩家可以操作什么指令 NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetOnWhoOptIns, GetInstructionsACK); //同步谁操作了什么指令 NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetSettlement, OnSettlement); //同步小结算 NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetBigSem, OnSettlementFinal); //大结算 NetProcess.RegisterResponseCallBack(MJProtoMap.CMD_PlayerJoinInRoom, OnPlayerJoinInRoom); //有玩家加入房间 NetProcess.RegisterResponseCallBack(MJProtoMap.CMD_OnGetChat, NetOnGameTalk); //同步游戏聊天 NetProcess.RegisterResponseCallBack(MJProtoMap.CMD_ReadyCountDown, OnReadyCountDown); //同步游戏准备倒计时 //NetProcess.RegisterResponseCallBack(MJProtoMap.Cmd_GetErrorCode, (msg) => //{ // ResponeErrorCode data = msg.Read<ResponeErrorCode>(); // GameUtils.ShowErrorTips(data.code); //});//错误列表 SetModel <MJGameModel>(); mModel = MJGameModel.Inst; }
public XXGoldFlowerGameView mView;//view public XXGoldFlowerGameController() : base("XXGoldFlowerGameView", AssetsPathDic.XXGoldFlowerGameView) { SetModel <XXGoldFlowerGameModel>(); NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnGoldLess, NetOnGoldLess); //金币不足 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnPlayerLeave, NetOnPlayerLeaveRoom); //玩家离开房间 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnPlayerSeatDown, NetOnPlayerSeatDown); //有玩家坐下 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnPlayerReady, NetOnPlayerReady); //玩家准备 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnGameStart, NetOnGameStart); //游戏开始 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnGameOptResult, NetOnGameOptResult); //玩家操作结果 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnGameStartLastTime, NetOnGameStartLastTime); //倒计时 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnSelfGameOpt, NetOnSelfGameOpt); //可操作列表 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnRoomCardLess, NetOnRoomCardLess); //代理的房卡不足 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnSamllSettle, NetOnSmallSettle); //小结算 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnPlayerOnOffLine, NetOnOnOffLine); //玩家上下线 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnPlayerShowCard, NetOnPlayerShowCards); //有玩家亮牌 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnUpdateRound, NetOnUpdateRound); //更新轮数 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnGameTalk, NetOnGameTalk); //同步游戏聊天 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnLastFight, NetOnLastFight); //最后一站 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnAutoChangDesk, NetOnAutoChangDesk); //自动换桌 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnJiesan, NetOnResolve); //房间解散 NetProcess.RegisterResponseCallBack(GoldFlowerProtoIdMap.CMD_OnDisolveTime, NetOnResolveTime); //房间解散时间 }
public LoginController() : base("LoginView", "Windows/LoginView/LoginView") { SetModel <LoginModel>(); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_RecieveLoginInOther, OnLoginInOther); }
public GamePatternView mView;//view public GamePatternController() : base("GamePatternView", AssetsPathDic.GamePatternView) { SetModel <GamePatternModel>(); NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_OnGetRoomChang, OnRoomInfoChang); //房间信息发生变化 NetProcess.RegisterResponseCallBack(ProtoIdMap.CMD_OnGamePatternPersonChanged, OnOnLinePersonChanged); //在线人数发生变化 }