/// <summary> /// 创建房间 /// </summary> /// <param name="req"></param> public void SendCreateRoomReq(SendCreateRoomReq req) { NetProcess.SendRequest <SendCreateRoomReq>(req, GoldFlowerProtoIdMap.CMD_SendCreateRoom, (msg) => { GoldFlowerCreateRoomAck ack = msg.Read <GoldFlowerCreateRoomAck>(); if (ack.code == 1) { XXGoldFlowerGameModel.Inst.CleanMode(true); ServerCreateJoinGame(ack.data); } else { GameUtils.ShowErrorTips(ack.code); } }); }
/// <summary> /// 加入金币场模式 /// </summary> /// <param name="id"></param> public void SendJoinGoldPattern(int id) { SendGoldFlowerJoinGoldRoom req = new SendGoldFlowerJoinGoldRoom(); req.id = id; SQDebug.Log("11111111111111"); NetProcess.SendRequest <SendGoldFlowerJoinGoldRoom>(req, GoldFlowerProtoIdMap.CMD_SendJoinGoldPattern, (msg) => { GoldFlowerCreateRoomAck ack = msg.Read <GoldFlowerCreateRoomAck>(); if (ack.code == 1) { XXGoldFlowerGameModel.Inst.CleanMode(true); ServerCreateJoinGame(ack.data); } else { GameUtils.ShowErrorTips(ack.code); } }); }
/// <summary> /// 切换房间 /// </summary> public void SendChangGoldPattern() { XXGoldFlowerGameModel.Inst.mChangDesk = true; CommonSendProto req = new CommonSendProto(); NetProcess.SendRequest <CommonSendProto>(req, GoldFlowerProtoIdMap.CMD_SendChangGoldRoom, (msg) => { GoldFlowerCreateRoomAck ack = msg.Read <GoldFlowerCreateRoomAck>(); if (ack.code == 1) { XXGoldFlowerGameModel.Inst.CleanMode(true); ServerCreateJoinGame(ack.data); } else { GameUtils.ShowErrorTips(ack.code); } if (mView != null) { mView.mSelfPlayer.SetChanagDeskBtnState(true); mView.mSelfPlayer.SetReadyBtnState(true); } }); }