コード例 #1
0
    /// <summary>
    /// 移除房间
    /// </summary>
    /// <param name="groupId">群Id</param>
    /// <param name="roomId">房间Id</param>
    public void RemoveRoom(int groupId, int roomId)
    {
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }
        for (int i = 0; i < group.rooms.Count; ++i)
        {
            if (group.rooms[i].roomId == roomId)
            {
                group.rooms.RemoveAt(i);
                group.roomCount = group.rooms.Count;
                break;
            }
        }

        TransferData data = new TransferData();

        data.SetValue("GroupId", groupId);
        data.SetValue("RoomId", roomId);
        SendNotification(ON_REMOVE_ROOM, data);

        SendGroupInfoChangedNotification(group);
    }
コード例 #2
0
    /// <summary>
    /// 设置成员身份
    /// </summary>
    /// <param name="groupId"></param>
    /// <param name="playerId"></param>
    /// <param name="isManager"></param>
    public void SetMemberIdentity(int groupId, int playerId, bool isManager, bool isPlayer)
    {
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }
        PlayerEntity player = GetMember(groupId, playerId);

        if (player == null)
        {
            return;
        }
        player.isManager = isManager;

        group.members.Sort();
        TransferData data = new TransferData();

        data.SetValue("GroupEntity", group);
        data.SetValue("PlayerEntity", player);
        data.SetValue("OneselfEntity", group.playerEntity);
        data.SetValue("IsPlayer", isPlayer);
        data.SetValue("Index", group.members.IndexOf(player));
        SendNotification(ON_PLAYER_INFO_CHANGED, data);
    }
コード例 #3
0
    /// <summary>
    /// 设置成员状态
    /// </summary>
    public void SetMemberStatus(int groupId, int playerId, long onLine)
    {
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }
        PlayerEntity player = GetMember(groupId, playerId);

        if (player == null)
        {
            return;
        }
        player.online = onLine;

        //group.members.Sort();
        TransferData data = new TransferData();

        data.SetValue("GroupEntity", group);
        data.SetValue("PlayerEntity", player);
        data.SetValue("OneselfEntity", group.playerEntity);
        data.SetValue("Index", group.members.IndexOf(player));
        SendNotification(ON_PLAYER_INFO_CHANGED, data);
    }
コード例 #4
0
    public void OpenGameLevelMapView(Transform windowUiPanelContainerTrans)
    {
        //读取本地配置表
        //默认读取第一章
        ChapterEntity chapterEntity = ChapterDBModel.GetInstance.GetEntityById(1);

        TransferData data = null;

        if (chapterEntity != null)
        {
            data = new TransferData();
            {
                data.SetValue <string>("ChapterName", chapterEntity.ChapterName);
                data.SetValue <int>("ChapterId", chapterEntity.Id);
                data.SetValue <string>("ChapterMapBg", chapterEntity.BG_Pic);
            }
        }

        //读取关卡
        List <GameLevelEntity> gameLevelEntities = GameLevelDBModel.GetInstance.GetListByChapterId(chapterEntity.Id);

        if (gameLevelEntities != null || gameLevelEntities.Count > 0)
        {
            data.SetValue <List <GameLevelEntity> >("GameLevelList", gameLevelEntities);
        }

        m_uIGameLevelMapView = WindowUIMgr.Instance.OpenWindow(WindowUIType.GameLevelMap).GetComponent <UIGameLevelMapView>();
        m_uIGameLevelMapView.transform.SetParent(windowUiPanelContainerTrans);
        m_uIGameLevelMapView.transform.localScale    = Vector3.one * 0.8f;
        m_uIGameLevelMapView.transform.localPosition = Vector3.zero;
        m_uIGameLevelMapView.transform.localRotation = Quaternion.identity;

        m_uIGameLevelMapView.SetUI(data, OnClickGameLevelCallback, windowUiPanelContainerTrans);
    }
コード例 #5
0
    /// <summary>
    /// 移除申请
    /// </summary>
    /// <param name="groupId"></param>
    /// <param name="playerId"></param>
    public void RemoveApply(int groupId, int playerId)
    {
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }

        for (int i = 0; i < group.ApplyList.Count; ++i)
        {
            if (group.ApplyList[i].id == playerId)
            {
                group.ApplyList.RemoveAt(i);
                break;
            }
        }
        group.hasNewApply = group.ApplyList.Count > 0;
        TransferData data = new TransferData();

        data.SetValue("GroupId", groupId);
        data.SetValue("PlayerId", playerId);
        data.SetValue("HasNewApply", group.hasNewApply);
        SendNotification(ON_GROUP_REMOVE_APPLY, data);
    }
コード例 #6
0
    /// <summary>
    /// 组合完成
    /// </summary>
    internal void GroupPokerProxy(GP_ROOM_GROUPPOKER proto)
    {
        SeatEntity seat = GetSeatBySeatId(proto.pos);

        seat.seatStatus = SEAT_STATUS.GROUPDONE;
        if (seat.pokerList.Count != 0)
        {
            seat.pokerList.Clear();
        }
        for (int i = 0; i < proto.pokerIndexListCount(); i++)
        {
            seat.pokerList.Add(new Poker()
            {
                Index = proto.getPokerIndexList(i), //索引
                Type  = proto.getPokerIndexList(i), //花色
                Size  = proto.getPokerIndexList(i), //大小
            });
        }
        TransferData data = new TransferData();

        data.SetValue("Seat", seat);
        data.SetValue("RoomStatus", CurrentRoom.roomStatus);
        SendNotification(ConstantGuPaiJiu.EndIamge, data);//组合完成显示完成
        if (seat != PlayerSeat)
        {
            return;
        }
        SendNotification(ConstantGuPaiJiu.GroupEnd, data);
    }
コード例 #7
0
    /// <summary>
    /// 当玩家处于下注时,重连的显示按钮
    /// </summary>
    /// <param name="data"></param>
    public void SetSeatInfoOperation(TransferData data)
    {
        SeatEntity       seat        = data.GetValue <SeatEntity>("Seat");
        ENUM_ROOM_STATUS roomStatus  = data.GetValue <ENUM_ROOM_STATUS>("RoomStatus");
        bool             IsPlayer    = data.GetValue <bool>("IsPlayer");
        RoomEntity       CurrentRoom = data.GetValue <RoomEntity>("Room");

        if (m_nSeatIndex == seat.Index)
        {
            if (seat.seatStatus == ENUM_SEAT_STATUS.BET && seat.seatToperateStatus != ENUM_SEATOPERATE_STATUS.Discard)
            {
                //if (seat.pos==RoomZhaJHProxy.Instance.PlayerSeat.pos)
                //{
                guangshu.SetActive(true);
                TransferData data1 = new TransferData();
                data1.SetValue("round", CurrentRoom.round);
                data1.SetValue("totalRound", CurrentRoom.totalRound);
                data1.SetValue("Fen", CurrentRoom.roomPour);
                data1.SetValue("Seat", seat);
                ModelDispatcher.Instance.Dispatch(ZhaJHMethodname.OnZJHBtnShow, data1);
                ModelDispatcher.Instance.Dispatch(ZhaJHMethodname.OnZJHHidFen, data1);
                if (RoomZhaJHProxy.Instance.btnGDD)
                {
                    ZhaJHGameCtrl.Instance.WithNotes(null);
                }
                //}
            }
        }
    }
コード例 #8
0
        /// <summary>
        ///   服务器广播所有玩家开始下注
        /// </summary>
        /// <param name="obj"></param>
        public void StartPour(NN_ROOM_JETTON proto)
        {
            if (CurrentRoom.superModel == Room.SuperModel.CommonRoom)
            {
                CurrentRoom.currentLoop++;
            }

            for (int i = 0; i < CurrentRoom.SeatList.Count; i++)
            {
                CurrentRoom.SeatList[i].isAlreadyHOG = 0;
            }

            if (CurrentRoom.roomModel == Room.RoomModel.robBanker)
            {
                TransferData data = new TransferData();
                data.SetValue("CurrentRoom", CurrentRoom);
                data.SetValue("isOnOff", false);
                SendNotification(ConstDefine_NiuNiu.ObKey_SetRobBankerAni, data);
            }

            CurrentRoom.roomStatus = NN_ENUM_ROOM_STATUS.POUR;

            Debug.Log("通知开始下注,服务器发送时间:" + proto.unixtime);
            if (proto.hasUnixtime())
            {
                CurrentRoom.serverTime = proto.unixtime;
                SetCountDown();
            }

            SendRoomInfoChangeNotify();
        }
コード例 #9
0
 /// <summary>
 /// 每局结算
 /// </summary>
 /// <param name="proto"></param>
 internal void LoopSettleProxy(GP_ROOM_LOOPSETTLE proto)
 {
     CurrentRoom.roomStatus = ROOM_STATUS.IDLE;
     CurrentRoom.dealSecond = 0;
     if (CurrentRoom.roomPokerList.Count != 0)
     {
         CurrentRoom.roomPokerList.Clear();
     }
     for (int i = 0; i < proto.room.seatListCount(); i++)
     {
         SeatEntity seat = GetSeatBySeatId(proto.room.getSeatList(i).pos);
         seat.seatStatus = SEAT_STATUS.READY;
         //seat.Gold += proto.room.getSeatList(i).earnings;
         //seat.loopEamings = proto.room.getSeatList(i).loopEarnings;
         if (CurrentRoom.roomMode == RoomEntity.RoomMode.RoundZhuang)
         {
             if (seat.IsBanker)
             {
                 seat.IsBanker = false;
             }
         }
         seat.firstPour  = 0;
         seat.secondPour = 0;
         TransferData data = new TransferData();
         data.SetValue("Seat", seat);
         data.SetValue("IsPlayer", seat == PlayerSeat);
         SendGameSeatInfoChangeNotify(seat);
     }
 }
コード例 #10
0
    /// <summary>
    /// 请求福利活动界面回调
    /// </summary>
    /// <param name="args"></param>
    private void OnRequestWelfareActivitiesCallBack(NetWorkHttp.CallBackArgs args)
    {
        if (args.HasError)
        {
            ShowMessage("提示", "网络连接失败");
        }
        else
        {
            if (args.Value.code < 0)
            {
                ShowMessage("提示", args.Value.msg);
                return;
            }
            if (args.Value.data == null || args.Value.data.Count == 0)
            {
                return;
            }

            WelfareActivitiesEntity welfareActivitiesEntity = LitJson.JsonMapper.ToObject <WelfareActivitiesEntity>(args.Value.data.ToJson());

            TransferData data = new TransferData();

            data.SetValue("treasureKeyNum", welfareActivitiesEntity.treasureKeyNum);
            data.SetValue("surPlusTimeCount", welfareActivitiesEntity.surPlusTimeCount);
            data.SetValue("lstBoxIndex", welfareActivitiesEntity.lstBoxIndex);
            data.SetValue("totalTimeCount", welfareActivitiesEntity.totalTimeCount);
            data.SetValue("lstLotteryWheelEntity", welfareActivitiesEntity.lstLotteryWheelEntity);

            if (m_UIWelfareActivitiesWindow)
            {
                m_UIWelfareActivitiesWindow.SetUI(data);
            }
        }
    }
コード例 #11
0
    public void RemoveRecord(int groupId, int battleId)
    {
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }

        for (int i = 0; i < group.recordList.Count; ++i)
        {
            if (group.recordList[i].battleId == battleId)
            {
                group.recordList.RemoveAt(i);
                break;
            }
        }

        TransferData data = new TransferData();

        data.SetValue("GroupId", groupId);
        data.SetValue("BattleId", battleId);

        SendNotification(ON_REMOVE_RECORD, data);
    }
コード例 #12
0
    /// <summary>
    /// 切锅
    /// </summary>
    internal void RoomCutpanProxy(GP_ROOM_CUTPAN proto)
    {
        SeatEntity   seat       = GetSeatBySeatId(proto.pos);
        long         CutPanTime = proto.unixtime;
        TransferData data       = new TransferData();

        data.SetValue("Time", CutPanTime);
        data.SetValue("IsPlayer", seat == PlayerSeat);
        if (!proto.hasIsCutPan())
        {
            SendNotification(ConstantGuPaiJiu.TellCutPan, data);
        }
        if (proto.hasIsCutPan())
        {
            //if (proto.isCutPan==1)
            //{
            //    CurrentRoom.roomStatus = ROOM_STATUS.READY;
            //    for (int i = 0; i < CurrentRoom.seatList.Count; i++)
            //    {
            //        CurrentRoom.seatList[i].IsBanker = false;
            //        CurrentRoom.seatList[i].seatStatus = SEAT_STATUS.READY;
            //    }
            //}
            SendNotification(ConstantGuPaiJiu.CutPanResult, data);
        }
    }
コード例 #13
0
    /// <summary>
    /// 打开大转盘窗口测试
    /// </summary>
    private void LotteryWheelWindow()
    {
        LotteryWheelWindowEntity lotteryWheelWindowEntity = new LotteryWheelWindowEntity();

        lotteryWheelWindowEntity.useable = 5;
        lotteryWheelWindowEntity.total   = 10;
        List <lotteryWheelEntity> lstLotteryWheelEntity = new List <lotteryWheelEntity>();

        for (int i = 0; i < 12; i++)
        {
            lstLotteryWheelEntity[i].id      = i;
            lstLotteryWheelEntity[i].img_url = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3725680684,3018861305&fm=27&gp=0.jpg";
            lstLotteryWheelEntity[i].name    = i + "_name";
            lstLotteryWheelEntity[i].type    = GiftType.Again;
        }
        lotteryWheelWindowEntity.prize = lstLotteryWheelEntity;

        TransferData data = new TransferData();

        data.SetValue("surPlusTimeCount", lotteryWheelWindowEntity.useable);
        data.SetValue("totalTimeCount", lotteryWheelWindowEntity.total);
        data.SetValue("lstLotteryWheelEntity", lotteryWheelWindowEntity.prize);

        if (m_UIWelfareActivitiesWindow)
        {
            m_UIWelfareActivitiesWindow.SetLotteryWheel(data);
        }
    }
コード例 #14
0
 private void OnAgentServiceConfigCallBack(NetWorkHttp.CallBackArgs args)
 {
     if (args.HasError)
     {
         ShowMessage("提示", "网络连接失败");
     }
     else
     {
         if (args.Value.code < 0)
         {
             ShowMessage("错误", args.Value.msg);
             return;
         }
         List <TransferData> lstData = new List <TransferData>();
         if (args.Value.data == null || args.Value.data.Count == 0)
         {
             return;
         }
         for (int i = 0; i < args.Value.data.Count; i++)
         {
             LitJson.JsonData jsonData    = args.Value.data[i];
             string           id          = jsonData["id"].ToString();     //ID
             string           textWX      = jsonData["wx"].ToString();     //微信号
             string           phoneNumber = jsonData["tel"].ToString();    //电话
             string           remark      = jsonData["remark"].ToString(); //地区
             string           status      = jsonData["status"].ToString(); //状态
             TransferData     data        = new TransferData();
             data.SetValue("wx", textWX);
             data.SetValue("tel", phoneNumber);
             lstData.Add(data);
         }
         m_UIAgentServiceWindow.SetUI(lstData, OnBtnInfoClick);
     }
 }
コード例 #15
0
    /// <summary>
    /// 福利活动界面钥匙与次数的设置
    /// </summary>
    private void WelfareActivitiesWindow()
    {
        List <lotteryWheelEntity> lstLotteryWheelEntity = new List <lotteryWheelEntity>();

        for (int i = 0; i < 12; i++)
        {
            lotteryWheelEntity lotteryWheelEntity = new lotteryWheelEntity();
            lotteryWheelEntity.id      = i;
            lotteryWheelEntity.name    = "GGGGQQQQQ";
            lotteryWheelEntity.img_url = "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3725680684,3018861305&fm=27&gp=0.jpg";
            lotteryWheelEntity.type    = GiftType.Null;
            lstLotteryWheelEntity.Add(lotteryWheelEntity);
        }
        WelfareActivitiesEntity welfareActivitiesEntity = new WelfareActivitiesEntity(3, 3, 10, lstLotteryWheelEntity);

        TransferData data = new TransferData();

        data.SetValue("treasureKeyNum", welfareActivitiesEntity.treasureKeyNum);
        data.SetValue("surPlusTimeCount", welfareActivitiesEntity.surPlusTimeCount);
        data.SetValue("lstBoxIndex", welfareActivitiesEntity.lstBoxIndex);
        data.SetValue("totalTimeCount", welfareActivitiesEntity.totalTimeCount);
        data.SetValue("lstLotteryWheelEntity", welfareActivitiesEntity.lstLotteryWheelEntity);

        if (m_UIWelfareActivitiesWindow)
        {
            m_UIWelfareActivitiesWindow.SetUI(data);
        }
    }
コード例 #16
0
    /// <summary>
    /// 请求发送获得礼品玩家的相关信息回调
    /// </summary>
    /// <param name="args"></param>
    private void OnRequestSendMessageCallBack(NetWorkHttp.CallBackArgs args)
    {
        if (args.HasError)
        {
            ShowMessage("提示", "网络连接失败");
        }
        else
        {
            if (args.Value.code < 0)
            {
                ShowMessage("提示", args.Value.msg);
                return;
            }
            //if (args.Value.data == null || args.Value.data.Count == 0) return;

            ExchangeRecordCallBackEntity exchangeRecordCallBackEntity = LitJson.JsonMapper.ToObject <ExchangeRecordCallBackEntity>(args.Value.data.ToJson());;

            string wxCustonmerService = exchangeRecordCallBackEntity.wx_kf;

            TransferData data = new TransferData();

            data.SetValue("wxCustonmerService", wxCustonmerService);

            data.SetValue("id", exchangeRecordCallBackEntity.id);

            if (m_UIExchangeRecordWindow)
            {
                m_UIExchangeRecordWindow.SetExchangeRecord(data);
            }
            UIViewUtil.Instance.LoadWindow("ApplySuccessdMessage").GetComponent <UIApplySuccessdMessageView>().SetUI(data);

            RequestExchangeRecordInfo();
        }
    }
コード例 #17
0
ファイル: RoomProxy.cs プロジェクト: guochaolinDLKF/LaiJu
        /// <summary>
        /// 初始化房间
        /// </summary>
        /// <param name="room"></param>
        public void InitRoom(RoomEntity room)
        {
            CurrentRoom = room;
            CalculateSeatIndex();

            bool mustPlay = false;
            bool canPlay  = true;
            Deck prevDeck = GetPreviourDeck();

            if (prevDeck == null)
            {
                mustPlay = true;
            }
            else
            {
                List <Deck> Tip = DouDiZhuHelper.GetStrongerDeck(prevDeck, CurrentRoom.PlayerSeat.pokerList);

                if (Tip == null || Tip.Count == 0)
                {
                    canPlay = false;
                }
            }



            TransferData data = new TransferData();

            data.SetValue("Room", CurrentRoom);
            data.SetValue("MustPlay", mustPlay);
            data.SetValue("CanPlay", canPlay);
            SendNotification(ON_INIT, data);

            SendRoomInfoChangeNotify();
        }
コード例 #18
0
    /// <summary>
    /// 请求按下大转盘按钮回调
    /// </summary>
    /// <param name="args"></param>
    private void OnRequestDrawGiftCallBack(NetWorkHttp.CallBackArgs args)
    {
        if (args.HasError)
        {
            ShowMessage("提示", "网络连接失败");
        }
        else
        {
            if (args.Value.code < 0)
            {
                ShowMessage("提示", args.Value.msg);
                return;
            }
            if (args.Value.data == null || args.Value.data.Count == 0)
            {
                return;
            }

            LotteryWheelGiftCallBackEntity lotteryWheelGiftEntity = LitJson.JsonMapper.ToObject <LotteryWheelGiftCallBackEntity>(args.Value.data.ToJson());

            TransferData data = new TransferData();

            data.SetValue("giftIndex", lotteryWheelGiftEntity.id);
            data.SetValue("time", lotteryWheelGiftEntity.useable);
            data.SetValue("timeTotal", lotteryWheelGiftEntity.total);
            //data.SetValue("giftType", lotteryWheelGiftEntity.giftType);
            //data.SetValue("giftCallBackNum", lotteryWheelGiftEntity.giftCount);
            //data.SetValue("message", lotteryWheelGiftEntity.message);

            if (m_UIWelfareActivitiesWindow)
            {
                m_UIWelfareActivitiesWindow.StartTurn(data);
            }
        }
    }
コード例 #19
0
    /// <summary>
    /// 请求商店配置回调
    /// </summary>
    /// <param name="args"></param>
    private void OnRequestShopConfigCallBack(NetWorkHttp.CallBackArgs args)
    {
        if (args.HasError)
        {
            ShowMessage("提示", "网络连接失败");
        }
        else
        {
            if (args.Value.code < 0)
            {
                ShowMessage("提示", args.Value.msg);
                return;
            }
            TransferData        data    = new TransferData();
            List <TransferData> lstShop = new List <TransferData>();

            m_GoodsList.Clear();

            for (int i = 0; i < args.Value.data.Count; ++i)
            {
                LitJson.JsonData jsonData = args.Value.data[i];
                int    id        = jsonData["id"].ToString().ToInt();
                string name      = jsonData["name"].ToString();
                string iosCode   = jsonData["iosCode"].ToString();
                int    money     = jsonData["money"].ToString().ToInt();
                int    amount    = jsonData["amount"].ToString().ToInt();
                int    giveCount = jsonData["give"].ToString().ToInt();
                bool   isHot     = jsonData["isHot"].ToString().ToBool();
                string icon      = jsonData["icon"].ToString();

                TransferData shopData = new TransferData();
                shopData.SetValue("ShopId", id);
                shopData.SetValue("ShopName", name);
                shopData.SetValue("IosCode", iosCode);
                shopData.SetValue("Money", money);
                shopData.SetValue("Amount", amount);
                shopData.SetValue("GiveCount", giveCount);
                shopData.SetValue("IsHot", isHot);
                shopData.SetValue("Icon", icon);
                lstShop.Add(shopData);

                GoodsEntity goods = new GoodsEntity()
                {
                    amount    = amount,
                    giveCount = giveCount,
                    icon      = icon,
                    id        = id,
                    iosCode   = iosCode,
                    isHot     = isHot,
                    money     = money,
                    name      = name
                };

                m_GoodsList.Add(goods);
            }
            data.SetValue("ShopList", lstShop);
            data.SetValue("BindCode", AccountProxy.Instance.CurrentAccountEntity.codebind);
            m_UIShopWindow.SetUI(data, OnPropClick, OnBtnInfoClick);
        }
    }
コード例 #20
0
    /// <summary>
    /// 切牌或者不切
    /// </summary>
    internal void CutPokerProxy(GP_ROOM_CUTPOKER proto)
    {
        SeatEntity   seat = GetSeatBySeatId(proto.pos);
        TransferData data = new TransferData();

        data.SetValue("isCut", false);
        data.SetValue("isWait", true);
        data.SetValue("IsPlayer", seat == PlayerSeat);
        switch ((EnumCutPoker)proto.isCutPoker)
        {
        case EnumCutPoker.Cut:
            data.SetValue("Room", CurrentRoom);
            SendNotification(ConstantGuPaiJiu.StartCutPoker, data);
            break;

        case EnumCutPoker.NoCut:
            SendNotification(ConstantGuPaiJiu.NoCutPoker, data);
            break;

        case EnumCutPoker.NotOperational:
            break;

        default:
            break;
        }
        //SendNotification(ConstantGuPaiJiu.TellCutPoker, data);
    }
コード例 #21
0
    /// <summary>
    /// 实例化牌
    /// </summary>
    /// <param name="index"></param>
    private void InstantiationPoker(SeatEntity seat, string spriteName)
    {
        TransferData data = new TransferData();

        data.SetValue("index", seat.Index);
        data.SetValue("Seat", seat);
        data.SetValue("spriteName", spriteName);
        ModelDispatcher.Instance.Dispatch(ZhaJHMethodname.OnZJHHairPoker, data);
    }
コード例 #22
0
        /// <summary>
        /// 根据当前游戏状态设置 交互显影(计时器 选分按钮 庄家开始按钮)
        /// </summary>
        void SetInteractionOnOff()
        {
            TransferData data = new TransferData();

            data.SetValue("Room", CurrentRoom);
            data.SetValue("PlayerSeat", PlayerSeat);
            data.SetValue("playerNumber", playerNumber);

            SendNotification(ConstDefine_NiuNiu.ObKey_SetRoomInteraction, data);//设置交互显影
        }
コード例 #23
0
    /// <summary>
    /// 切牌动画
    /// </summary>
    internal void CutPokerAniProxy(GP_ROOM_CUTPOKER proto)
    {
        int          dun  = proto.cutPokerIndex;
        SeatEntity   seat = GetSeatBySeatId(proto.pos);
        TransferData data = new TransferData();

        data.SetValue("Seat", seat);
        data.SetValue("Dun", dun);
        SendNotification(ConstantGuPaiJiu.CutPokerAni, data);
    }
コード例 #24
0
    private void OpenGamelevelMapWindow()
    {
        m_GameLevelMapWin             = WindowUtil.Instance.OpenWindow(Window.GameLevelMap).GetComponent <UIGameLevelMapWindow>();
        m_GameLevelMapWin.BtnCallBack = OnViewBtnCallBack;
        GameObject gameLevelMap = ResourcesManager.Instance.LoadOther("GameLevel/UIGameChapterView");

        m_GameChapterView = gameLevelMap.GetComponent <UIGameChapterView>();
        gameLevelMap.SetParent(m_GameLevelMapWin.Container);
        gameLevelMap.GetComponent <RectTransform>().offsetMin = Vector2.zero;
        gameLevelMap.GetComponent <RectTransform>().offsetMax = Vector2.zero;
        List <ChapterEntity> list             = ChapterDBModel.Instance.GetList();
        List <TransferData>  transferDataList = new List <TransferData>();

        for (int i = 0; i < list.Count; i++)
        {
            TransferData data = new TransferData();
            data.SetValue(ConstDefine.Index, i + 1);
            data.SetValue(ConstDefine.FolderName, list[i].FolderName);
            data.SetValue(ConstDefine.IsOpen, i < 3);
            data.SetValue(ConstDefine.IconName, list[i].IconName);
            data.SetValue(ConstDefine.Name, list[i].Name);
            data.SetValue(ConstDefine.CurrStar, 0);
            data.SetValue(ConstDefine.MaxStar, list[i].LevelCount * 3);
            data.SetValue(ConstDefine.CurrProgeress, 0);
            data.SetValue(ConstDefine.MaxProgeress, list[i].LevelCount);
            data.ActionOneIntCallBack = CallBack;
            transferDataList.Add(data);
        }
        gameLevelMap.GetComponent <UIGameChapterListCtrl>().TotalCount = transferDataList.Count;
        gameLevelMap.GetComponent <UIGameChapterListCtrl>().Init(transferDataList);
    }
コード例 #25
0
ファイル: MatchProxy.cs プロジェクト: guochaolinDLKF/LaiJu
    /// <summary>
    /// 更新报名信息
    /// </summary>
    /// <param name="currentPlayerCount"></param>
    /// <param name="maxPlayerCount"></param>
    public void UpdateEnterInfo(int currentPlayerCount, int maxPlayerCount)
    {
        CurrentMatch.CurrentPlayerCount = currentPlayerCount;
        CurrentMatch.MaxPlayerCount     = maxPlayerCount;

        TransferData data = new TransferData();

        data.SetValue("CurrentPlayerCount", CurrentMatch.CurrentPlayerCount);
        data.SetValue("MaxPlayerCount", CurrentMatch.MaxPlayerCount);
        SendNotification(NotificationDefine.ON_APPLY_INFO_CHANGED, data);
    }
コード例 #26
0
    /// <summary>
    /// 设置倒计时
    /// </summary>
    /// <param name="countDown"></param>
    public void SetCountDown(long countDown, bool isPlayer = false, int seatIndex = 0, bool isClose = false)
    {
        Debug.Log("设置倒计时");
        TransferData data = new TransferData();

        data.SetValue("ServerTime", countDown);
        data.SetValue("IsPlayer", isPlayer);
        data.SetValue("IsClose", isClose);
        data.SetValue("SeatIndex", seatIndex);
        SendNotification(ConstDefine_PaoDeKuai.ON_COUNT_DOWN_CHANGED, data);
    }
コード例 #27
0
    /// <summary>
    /// 通知抢庄
    /// </summary>
    internal void TallGrabBankerProxy(GP_ROOM_GRABBANKER proto)
    {
        CurrentRoom.roomStatus   = ROOM_STATUS.GRABBANKER;
        CurrentRoom.roomUnixtime = proto.unixtime;
        TransferData data = new TransferData();

        data.SetValue("RoomStatus", CurrentRoom.roomStatus);
        data.SetValue("isGrabBaker", 3);
        data.SetValue("Unixtime", CurrentRoom.roomUnixtime);
        SendNotification(ConstantGuPaiJiu.GarbBankerSceneView, data);
    }
コード例 #28
0
    /// <summary>
    /// 设置选项是否选中
    /// </summary>
    /// <param name="option"></param>
    /// <param name="isSelect"></param>
    private void SetOptionSelect(cfg_settingEntity option, int isSelect)
    {
        option.init = isSelect;

        TransferData data = new TransferData();

        data.SetValue("IsOn", option.init);
        data.SetValue("Id", option.id);
        ModelDispatcher.Instance.Dispatch("OnSettingRuleOptionSelectedChange", data);

        SaveSetting();
    }
コード例 #29
0
    /// <summary>
    /// 添加战绩
    /// </summary>
    /// <param name="groupId"></param>
    /// <param name="record"></param>
    public void AddRecord(int groupId, RecordEntity record)
    {
        if (record == null)
        {
            return;
        }
        ChatGroupEntity group = GetGroup(groupId);

        if (group == null)
        {
            return;
        }

        if (!group.isRequested)
        {
            return;
        }

        for (int i = 0; i < group.recordList.Count; ++i)
        {
            if (group.recordList[i].battleId == record.battleId)
            {
                RemoveRecord(groupId, record.battleId);
                break;
            }
        }

        group.recordList.Add(record);

        TransferData data = new TransferData();

        data.SetValue("GroupId", group.id);
        data.SetValue("BattleId", record.battleId);
        data.SetValue <int>("RoomId", record.roomId);
        data.SetValue <string>("DateTime", record.time);
        data.SetValue <string>("GameName", record.gameName);
        List <TransferData> lstPlayer = new List <TransferData>();

        for (int i = 0; i < record.players.Count; ++i)
        {
            RecordPlayerEntity playerEntity = record.players[i];
            TransferData       playerData   = new TransferData();
            playerData.SetValue("PlayerId", playerEntity.id);
            playerData.SetValue("Avatar", playerEntity.avatar);
            playerData.SetValue("Gold", playerEntity.gold);
            playerData.SetValue("Nickname", playerEntity.nickname);
            lstPlayer.Add(playerData);
        }
        data.SetValue <List <TransferData> >("Player", lstPlayer);

        SendNotification(ON_ADD_RECORD, data);
    }
コード例 #30
0
    /// <summary>
    /// 通知庄家翻牌
    /// </summary>
    /// <param name="proto"></param>
    internal void IsBankeDrawProxy(GP_ROOM_INFORMBANKERDRAW proto)
    {
        CurrentRoom.roomStatus   = ROOM_STATUS.CHECK;
        CurrentRoom.roomUnixtime = proto.unixtime;
        SeatEntity   seat = GetSeatBySeatId(proto.pos);
        TransferData data = new TransferData();

        data.SetValue("Time", CurrentRoom.roomUnixtime);
        data.SetValue("Seat", seat);
        data.SetValue("IsPlayer", seat == PlayerSeat);
        data.SetValue("RoomStatus", CurrentRoom.roomStatus);
        SendNotification(ConstantGuPaiJiu.TellIsBankeDraw, data);
    }