public void DoLoadVipRoom(Action <VipRoomListSyn> callback) { PacketBase msg = new PacketBase() { packetType = PacketType.VipRoomListReuqest }; SocketNetTools.SendMsg(msg, PacketType.VipRoomListSyn, (data) => { VipRoomListSyn result = NetSerilizer.DeSerialize <VipRoomListSyn>(data.data); callback(result); }); }
void OnVipRoomListSyn(PacketBase msg) { if (0 == msg.code) { result = NetSerilizer.DeSerialize <VipRoomListSyn>(msg.data); SetupUI(); } else { Game.DialogMgr.PushDialog(UIDialog.SingleBtnDialog, msg.msg); } }
public override void OnSceneActivated(params object[] sceneData) { base.OnSceneActivated(sceneData); Game.SocketGame.AddEventListener(PacketType.VipRoomListSyn, OnVipRoomListSyn); if (null != sceneData && sceneData.Length > 0) { result = (VipRoomListSyn)sceneData[0]; } detail.BanPlayerSub_BanPlayerSub.gameObject.SetActive(false); detail.CloseBanButton_Button.gameObject.SetActive(false); SetupUI(); }
public void DoCreateVipRoom(int vipRoomType, int quanNum, int wangfa, Action <VipRoomListSyn> callback) { PacketBase msg = new PacketBase() { packetType = PacketType.CreateVipRoomRequest }; CreateVipRoomRequest request = new CreateVipRoomRequest(); request.vipRoomType = vipRoomType; request.quanNum = quanNum; //request.vipRoomType = 0; request.wangfa = wangfa; msg.data = NetSerilizer.Serialize(request); SocketNetTools.SendMsg(msg, PacketType.VipRoomListSyn, (data) => { VipRoomListSyn result = NetSerilizer.DeSerialize <VipRoomListSyn>(data.data); callback(result); }); }