Ejemplo n.º 1
0
    //清除下注
    private void ClearBet()
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        AudioManager.Instance.PlaySound("button");
        uiDicePlane.DiceTcpOperation.clearBet();
    }
Ejemplo n.º 2
0
    //历史记录按钮事件
    private void iRBtnOnclick()
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        AudioManager.Instance.PlaySound("button");
        uiDicePlane.DiceTcpOperation.history();
    }
Ejemplo n.º 3
0
    //最后结算一次自己的财富
    public override void playerSettle(DiceSettleRankingDto d)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        PlayerCache.loginInfo.gold = d.residueGold;
        //调用财富变化方法
        uIDicePlane.SelfWeathChange(d);
    }
Ejemplo n.º 4
0
    //本局结束
    public override void end()
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        //清空自己胜负链表
        Diceliuliu.ResultBetDic.Clear();
        uIDicePlane.Clear();
    }
Ejemplo n.º 5
0
    //本人下座
    public override void positionDown2CallBack(bool callBackParam)
    {
        UIDicePlane UIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        PlayerCache.SeatPlayerinfoDic.Remove(PlayerCache.loginInfo.uid);
        //调用座位增加方法
        UIDicePlane.UISeatReduch();
    }
Ejemplo n.º 6
0
    //我要下座按钮事件
    private void DownSeatOnclick()
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        AudioManager.Instance.PlaySound("button");
        if (PlayerCache.SeatPlayerinfoDic.ContainsKey(PlayerCache.loginInfo.uid))
        {
            uiDicePlane.DiceTcpOperation.positionDown();
        }
    }
Ejemplo n.º 7
0
    //有人下座
    public override void playerPositionDown(long uid)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (PlayerCache.SeatPlayerinfoDic.ContainsKey(uid))
        {
            PlayerCache.SeatPlayerinfoDic.Remove(uid);
            uIDicePlane.UISeatReduch();
        }
    }
Ejemplo n.º 8
0
    //开始
    public override void start()
    {
        UIDicePlane  uIDicePlane  = MessageManager.GetInstance.GetUIDict <UIDicePlane>();
        DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();

        //记录自己的财富
        uIDicePlane.SelfWeathinfo();
        //倒计时开始
        diceGameMove.CountdownMove1(25);
        uIDicePlane.BetChipBool(true);
    }
Ejemplo n.º 9
0
    //返回大厅
    public override void exitRoom2CallBack(bool callBackParam)
    {
        UIDicePlane  uIDicePlane  = MessageManager.GetInstance.GetUIDict <UIDicePlane>();
        DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();

        uIDicePlane.BackGameboj();
        diceGameMove.BackGameboj();
        UIManager.Instance.Clear();
        PlayerCache.SeatPlayerinfoDic.Clear();
        SceneManager.LoadScene((int)SceneType.Hall);
    }
Ejemplo n.º 10
0
    //踢人下座位
    public override void kicking2CallBack(bool callBackParam)
    {
        UIDicePlane UIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (callBackParam == true)
        {
            //从有座玩家字典中删除
            PlayerCache.SeatPlayerinfoDic.Remove(PlayerCache.CurrentOtherPlayerUID);
            //调用座位减少方法
            UIDicePlane.UISeatReduch();
        }
    }
Ejemplo n.º 11
0
    //有人上座
    public override void playerPositionUp(GameDicePositionPlayerInfoDto dto)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (PlayerCache.SeatPlayerinfoDic.ContainsKey(dto.uid))
        {
            PlayerCache.SeatPlayerinfoDic.Remove(dto.uid);
        }
        //把玩家信息添加进字典中
        PlayerCache.SeatPlayerinfoDic.Add(dto.uid, dto);
        //调用座位增加方法
        uIDicePlane.UISeatReduch();
    }
Ejemplo n.º 12
0
    //场中无座玩家按钮事件
    private void OtherinfoOpenOnclick()
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (OtherinfoPanel.gameObject.activeSelf)
        {
        }
        else
        {
            AudioManager.Instance.PlaySound("button");
            uiDicePlane.DiceTcpOperation.nowPlayPlayerList();
        }
    }
Ejemplo n.º 13
0
 //下注成功返回事件
 public override void bet2CallBack(GameDiceBetUpdateWeathDto callBackParam)
 {
     if (callBackParam != null)
     {
         DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();
         UIDicePlane  UIDicePlane  = MessageManager.GetInstance.GetUIDict <UIDicePlane>();
         //及时更改自己的财富
         PlayerCache.loginInfo.gold = callBackParam.residueGold;
         //自己投注金额及财富变更改变
         diceGameMove.SelfBetGoldCount(callBackParam);
         UIDicePlane.BetSucceed(callBackParam);
     }
 }
Ejemplo n.º 14
0
    /// <summary>
    /// 更新财富显示
    /// </summary>
    public static void WealthUpdate()
    {
        UIHallManager uIHallManager = MessageManager.GetInstance.GetUIDict <UIHallManager>();

        if (uIHallManager != null)
        {
            uIHallManager.UpdateUI();
        }
        //UIVipPanel uiVipMsg = MessageManager.GetInstance.GetUIDict<UIVipPanel>();
        //如果是在vip特权这个界面,就立即更新vip经验值
        //if (uiVipMsg != null)
        //{
        //    if (uiVipMsg.gameObject.activeSelf)
        //    {
        //        uiVipMsg.UpdateUI();
        //    }
        //}
        UIZJHPanel uIZJHPanel = MessageManager.GetInstance.GetUIDict <UIZJHPanel>();

        if (uIZJHPanel == null)
        {
            uIZJHPanel = MessageManager.GetInstance.GetUIDict <CheatZjhPanel>();
        }
        if (uIZJHPanel != null)
        {
            uIZJHPanel.UpdateSelfUIInfo();
        }
        UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>();

        if (uIWanRenChang != null)
        {
            uIWanRenChang.MiddleWeath();
        }
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (uIDicePlane != null)
        {
            uIDicePlane.MiddleWeath();
        }

        UIShopPanel shopuiMessage = MessageManager.GetInstance.GetUIDict <UIShopPanel>();

        if (shopuiMessage != null)
        {
            if (shopuiMessage.gameObject.activeSelf)
            {
                shopuiMessage.UpdateUIData();
            }
        }
    }
Ejemplo n.º 15
0
    //停止投注
    public void StopBet()
    {   //出现提示消息
        AudioManager.Instance.PlaySound("maidinglishou");
        AwaithintCor = ILMgr.Instance.StartCoroutine(Awaithint());
        CountDown.GetChild(0).GetComponent <Text>().text = "0";
        CountDown.gameObject.SetActive(false);
        if (CountdownMoveatorCor != null)
        {
            ILMgr.Instance.StopCoroutine(CountdownMoveatorCor);
        }
        CountdownMoveatorCor = null;
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        //不可以投注
        uiDicePlane.BetChipBool(false);
    }
Ejemplo n.º 16
0
    //本人上座位
    public override void positionUp2CallBack(bool callBackParam)
    {
        UIDicePlane UIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (callBackParam == true)
        {//存进座位字典中
            GameDicePositionPlayerInfoDto playerRoomBaseInfoDto = new GameDicePositionPlayerInfoDto();
            playerRoomBaseInfoDto.uid       = PlayerCache.loginInfo.uid;
            playerRoomBaseInfoDto.useAutoId = PlayerCache.loginInfo.useAutoId;
            playerRoomBaseInfoDto.gold      = PlayerCache.loginInfo.gold;
            playerRoomBaseInfoDto.headUrl   = PlayerCache.loginInfo.headImgUrl;
            playerRoomBaseInfoDto.position  = UIDicePlane.PostionSeat;
            playerRoomBaseInfoDto.userName  = PlayerCache.loginInfo.userName;
            playerRoomBaseInfoDto.vipLv     = PlayerCache.loginInfo.vipLv;
            PlayerCache.SeatPlayerinfoDic.Add(playerRoomBaseInfoDto.uid, playerRoomBaseInfoDto);
            //调用座位增加方法
            UIDicePlane.UISeatReduch();
        }
    }
Ejemplo n.º 17
0
    //清除下注成功
    public void ClearBetSucc(long gold)
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        //自己财富值变更
        uiDicePlane.PlayerGoldCount.text = gold.ToString();
        uiDicePlane.IsBack = true;
        //所有筹码隐藏
        for (int i = 0; i < uiDicePlane.BetChipPos.childCount; i++)
        {
            uiDicePlane.BetChipPos.GetChild(i).gameObject.SetActive(false);
        }
        tempselfgold = 0;
        //uiDicePlane.tempbetup = 0;
        uiDicePlane.IsBeting = true;
        //投注值
        betGoldcount.text = "0";
        XUIMidMsg.QuickMsg("金币已退还");
    }
Ejemplo n.º 18
0
    //进入房间
    public void InitialInfo(DiceRoomInfiDto diceRoomInfiDto)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        if (diceRoomInfiDto != null)
        {    //将有座玩家信息存进字典
            for (int i = 0; i < diceRoomInfiDto.positionInfo.Count; i++)
            {
                if (PlayerCache.SeatPlayerinfoDic.ContainsKey(diceRoomInfiDto.positionInfo[i].uid))
                {
                    PlayerCache.SeatPlayerinfoDic.Remove(diceRoomInfiDto.positionInfo[i].uid);
                }
                if (diceRoomInfiDto.positionInfo[i].position >= 0)
                {
                    PlayerCache.SeatPlayerinfoDic.Add(diceRoomInfiDto.positionInfo[i].uid, diceRoomInfiDto.positionInfo[i]);
                }
            }
            //开局座位信息显示
            uIDicePlane.UISeat();

            //更改倒计时
            if (diceRoomInfiDto.roomTimer < 25)
            {
                CountdownMove(diceRoomInfiDto.roomTimer);
            }
            if (diceRoomInfiDto.roomTimer > 28)
            {
                XUIMidMsg.QuickMsg("结算中,请稍等");
            }
            //更改下注人数和总额
            Betpeoplenum_RentalMove(diceRoomInfiDto.betPlayerNum, diceRoomInfiDto.betAllNum);
            GameManager.Instance.diceRoomInfiDto = null;
            //筹码事件
            uIDicePlane.StakeCountonclick(0);
            //获取个人信息
            uIDicePlane.GainPlayer();
            //记录初始金币
            uIDicePlane.SelfWeathinfo();
            //投注上限
            //Maximumbetsvo(Diceliuliu.diceRoomInfiDto.BetLimit);
        }
    }
Ejemplo n.º 19
0
    //我是闪光协程
    IEnumerator Bulingator(int x)
    {
        UIDicePlane uiDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        while (true)
        {
            if (Diceliuliu.diceSettleCount[0] == Diceliuliu.diceSettleCount[1])
            {
                if (x < 12)
                {
                    uiDicePlane.RoundBtnList[(x / 2) - 1].GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.RoundBtnList[(x / 2) - 1].GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.RoundBtnList[(x / 2) - 1].GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.RoundBtnList[(x / 2) - 1].GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    //调用游戏结算页面
                    Gamecurrency();
                    break;
                }
                else
                {
                    uiDicePlane.BetBtnList[11].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[11].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[11].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[11].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[15].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    //调用游戏结算页面
                    Gamecurrency();
                    break;
                }
            }
            else
            {
                if (x > 6)
                {
                    uiDicePlane.BetBtnList[12].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[12].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[12].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[12].transform.GetChild(0).GetComponent <Image>().color    = new Color(1, 1, 1, 0);
                    //调用游戏结算页面
                    Gamecurrency();
                    break;
                }
                else
                {
                    uiDicePlane.BetBtnList[0].transform.GetChild(0).GetComponent <Image>().color     = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[0].transform.GetChild(0).GetComponent <Image>().color     = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[0].transform.GetChild(0).GetComponent <Image>().color     = new Color(1, 1, 1, 1);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 1);
                    yield return(new WaitForSeconds(0.3f));

                    uiDicePlane.BetBtnList[0].transform.GetChild(0).GetComponent <Image>().color     = new Color(1, 1, 1, 0);
                    uiDicePlane.BetBtnList[x - 1].transform.GetChild(0).GetComponent <Image>().color = new Color(1, 1, 1, 0);
                    //调用游戏结算页面
                    Gamecurrency();
                    break;
                }
            }
        }
    }
Ejemplo n.º 20
0
    //有座位玩家财富变更
    public override void positionPlayerWeathUpdate(long uid, long exchangeGold, long residueGold)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        uIDicePlane.SeatPlayerwealth(uid, exchangeGold, residueGold);
    }
Ejemplo n.º 21
0
    //有玩家中途财富变更
    public override void playerWeathUpdate(long uid, ItemListDto dto)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        uIDicePlane.MiddleWeath(uid, dto);
    }
Ejemplo n.º 22
0
    //有人清空投注
    public override void playerClearBet(long uid, long residueGold, long roomAllGold, int nowBetCount)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        uIDicePlane.PlayerClearBet(uid, residueGold, roomAllGold, nowBetCount);
    }
Ejemplo n.º 23
0
    //别人下注
    public override void playerBet(long uid, long holdGold, int betGold, int betPosition, int betNum, long roomAllGold)
    {
        UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>();

        uIDicePlane.OtherPlayerBet(uid, holdGold, betGold, betPosition, betNum, roomAllGold);
    }