Exemple #1
0
    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);
        });
    }
Exemple #2
0
 void OnVipRoomListSyn(PacketBase msg)
 {
     if (0 == msg.code)
     {
         result = NetSerilizer.DeSerialize <VipRoomListSyn>(msg.data);
         SetupUI();
     }
     else
     {
         Game.DialogMgr.PushDialog(UIDialog.SingleBtnDialog, msg.msg);
     }
 }
Exemple #3
0
    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();
    }
Exemple #4
0
    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);
        });
    }