Exemple #1
0
 //中途座位变化
 public void UISeatReduch()
 {
     for (int i = 0; i < SeatList.Count; i++)
     {
         SeatList[i].GetComponent <Image>().color = new Color(1, 1, 1, 1);
         SeatList[i].transform.GetChild(0).gameObject.SetActive(false);
     }
     foreach (GameDicePositionPlayerInfoDto value in PlayerCache.SeatPlayerinfoDic.Values)
     {
         SeatList[value.position].GetComponent <Image>().color = new Color(0, 0, 0, 0);
         Player = SeatList[value.position].transform.GetChild(0).gameObject;
         Player.transform.GetChild(3).GetComponent <Text>().text = value.userName;
         LoadHeadImgUtils.Instance.LoadHeadImg(Player.transform.GetChild(0).GetComponent <Image>(), value.headUrl);
         Player.transform.GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(value.gold);
         if (value.vipLv > 0)
         {
             Player.transform.GetChild(1).GetComponent <Image>().sprite = VIPImages[value.vipLv - 1];
             Player.transform.GetChild(1).gameObject.SetActive(true);
         }
         else
         {
             Player.transform.GetChild(1).gameObject.SetActive(false);
         }
         Player.gameObject.SetActive(true);
     }
 }
Exemple #2
0
    /// <summary>
    /// 更新信息返利轮盘界面信息
    /// </summary>
    public void UpdateRebateRouletteData(RebateDialInfoDto rebateDialInfoDto)
    {
        if (rebateDialInfoDto != null)
        {
            //万人争霸投注量
            wanrenBet.text = NumberConvert.ConvertW(rebateDialInfoDto.toRoomBetNum);
            //天天乐投注量
            daydayBet.text = NumberConvert.ConvertW(rebateDialInfoDto.ahRoonBetNum);
            //摇摇乐投注量
            teeterBet.text = NumberConvert.ConvertW(rebateDialInfoDto.diceRoomNum);
            //抽奖次数

            if (rebateDialInfoDto.canGetCount > 0)
            {
                drawCount.text       = "剩余次数(" + rebateDialInfoDto.canGetCount + ")";
                drawBtn.interactable = true;
            }
            else
            {
                drawCount.text       = "剩余次数(" + rebateDialInfoDto.canGetCount + ")";
                drawBtn.interactable = false;
            }
            //已充值的金额
            TopUpNum.text = rebateDialInfoDto.topUpNum.ToString() + "钻石";
            //已抽奖次数
            alreadyTimes.text = rebateDialInfoDto.getCounted.ToString();
            totalBet.text     = NumberConvert.ConvertW(rebateDialInfoDto.toRoomBetNum + rebateDialInfoDto.ahRoonBetNum + rebateDialInfoDto.diceRoomNum);
            betcountText.text = "在万人争霸、摇摇乐、天天乐投注总共达到" + NumberConvert.ConvertW(rebateDialInfoDto.betAllCount) + "可获得1次抽奖机会";
        }
    }
Exemple #3
0
    public void UpdateUIData(PlayerInfoDto playerInfo)
    {
        if (playerInfo != null)
        {
            userPanelGold.text    = NumberConvert.ConvertW(playerInfo.gold);
            userPanelRank.text    = NumberConvert.GetTitle(playerInfo.gold);
            userPanelDiamond.text = playerInfo.diamond.ToString();
            if (playerInfo.useAutoId > 0)
            {
                PlayerCache.loginInfo.useAutoId = playerInfo.useAutoId;
                currentCar.sprite = GameTools.Instance.GetSpite("Sprite/Shop/car/" + playerInfo.useAutoId);
                currentCar.gameObject.SetActive(true);
            }
            else
            {
                currentCar.gameObject.SetActive(false);
            }


            //头像显示
            LoadHeadImgUtils.Instance.LoadHeadImg(userHeadimg, playerInfo.headImgUrl);

            userName.text = playerInfo.userName;
            //判断是不是靓号
            if (false)
            {
                advanceTxt.gameObject.SetActive(true);
                generalTxt.gameObject.SetActive(false);
                advanceTxt.text = playerInfo.uid.ToString();
            }
            else
            {
                advanceTxt.gameObject.SetActive(false);
                generalTxt.gameObject.SetActive(true);
                generalTxt.text = playerInfo.uid.ToString();
            }
            userSex.text          = PlayerCache.loginInfo.sex;
            userPanelRank.text    = NumberConvert.GetTitle(playerInfo.gold);
            userPanelGold.text    = NumberConvert.ConvertW(playerInfo.gold);
            userPanelDiamond.text = playerInfo.diamond.ToString();
            userPanelCharm.text   = playerInfo.charm.ToString();
            StartCoroutine(GetLocatioin(addressTxt));
            if (playerInfo.vipLv > 0)
            {
                //显示vip等级
                vipImg.sprite = GameTools.Instance.GetSpriteAtlas("Sprite/Vip/VipAtlas1", "vip_level_big_icon_" + playerInfo.vipLv);

                vipImg.gameObject.SetActive(true);
            }
            else
            {
                vipImg.gameObject.SetActive(false);
            }
        }
    }
Exemple #4
0
    //别人清空下注
    public void PlayerClearBet(long uid, long residueGold, long roomAllGold, int nowBetCount)
    {   //是不是座位玩家
        if (PlayerCache.SeatPlayerinfoDic.ContainsKey(uid))
        {
            PlayerCache.SeatPlayerinfoDic.TryGetValue(uid, out GameDicePositionPlayerInfoDto value);
            SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text
                = NumberConvert.ConvertW(residueGold);
        }
        DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();

        diceGameMove.Betpeoplenum_RentalMove1(roomAllGold, nowBetCount);
    }
Exemple #5
0
    /// <summary>
    /// 显示牌信息
    /// </summary>
    public void ShowCardsResult(LotteryHistoryDto result)
    {
        stopBet.gameObject.SetActive(false);
        AHEndTxt.gameObject.SetActive(true);
        LastResult.text         = GameTools.GetCardType(result.result);
        lastTimeGrantAward.text = NumberConvert.ConvertW(result.lastTimeGrantAward);

        if (transform.gameObject.activeSelf)
        {
            ShowChard(result.cardIds, result.result);
        }
    }
Exemple #6
0
 //有座玩家财富变更
 public void SeatPlayerwealth(long uid, long exchangeGold, long residueGold)
 {
     if (PlayerCache.SeatPlayerinfoDic.ContainsKey(uid))
     {
         PlayerCache.SeatPlayerinfoDic.TryGetValue(uid, out GameDicePositionPlayerInfoDto value);
         SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text =
             NumberConvert.ConvertW(residueGold);
         GameDicePositionPlayerInfoDto player = value;
         player.gold = residueGold;
         PlayerCache.SeatPlayerinfoDic.Remove(uid);
         PlayerCache.SeatPlayerinfoDic.Add(uid, player);
     }
 }
Exemple #7
0
    //游戏结算自己财富变化
    public void SelfWeathChange(DiceSettleRankingDto d)
    {
        DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();

        //财富变更
        diceGameMove.Selfweathnum = d.winGold;
        IsBack   = true;
        tempgold = NumberConvert.ConvertW(d.residueGold);
        //如果在座位中
        if (PlayerCache.SeatPlayerinfoDic.ContainsKey(d.uid))
        {
            PlayerCache.SeatPlayerinfoDic.TryGetValue(d.uid, out GameDicePositionPlayerInfoDto value);
            SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text = tempgold;
        }
        PlayerGoldCount.text = tempgold.ToString();
    }
Exemple #8
0
    ////别人投注事件
    public void OtherPlayerBet(long uid, long holdGold, int betGold, int betPosition, int betNum, long roomAllGold)
    {
        AudioManager.Instance.PlaySound("selfbet");
        if (uid != PlayerCache.loginInfo.uid)
        {
            //如果该账号在有座位字典中
            if (PlayerCache.SeatPlayerinfoDic.ContainsKey(uid))
            {
                PlayerCache.SeatPlayerinfoDic.TryGetValue(uid, out GameDicePositionPlayerInfoDto value);
                for (int i = 0; i < ChipValueList.Length; i++)
                {
                    //根据金币数量生成筹码
                    if (ChipValueList[i] == betGold)
                    {
                        if (BetChipPos.childCount != 0)
                        {
                            for (int j = 0; j < BetChipPos.childCount; j++)
                            {
                                GameObject obj = BetChipPos.GetChild(j).gameObject;
                                if (obj.activeSelf == false)
                                {
                                    //更换图片
                                    obj.GetComponent <Image>().sprite = BetSpriteList[i];
                                    //移动到这个位置
                                    Tweener tweener = obj.GetComponent <Image>().transform.DOLocalMove
                                                          (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                                       Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);
                                    obj.SetActive(true);

                                    break;
                                }//说明是最后一个
                                else if (j == BetChipPos.childCount - 1)
                                {
                                    if (j >= 200)
                                    {
                                        for (int x = 0; x < 190; x++)
                                        {
                                            int y = Random.Range(0, 190);
                                            if (BetChipPos.GetChild(y).gameObject.activeSelf)
                                            {
                                                BetChipPos.GetChild(y).gameObject.SetActive(false);
                                            }
                                            else
                                            {
                                                break;
                                            }
                                        }
                                    }
                                    //重新生成
                                    GameObject clone = Instantiate(BetChip, BetChipPos);
                                    //更换图片
                                    clone.GetComponent <Image>().sprite = BetSpriteList[i];
                                    //移动到这个位置
                                    Tweener tweener = clone.GetComponent <Image>().transform.DOLocalMove
                                                          (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                                       Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);

                                    break;
                                }
                            }
                        }
                        else
                        {
                            //重新生成
                            GameObject obj = Instantiate(BetChip, BetChipPos);
                            //更换图片
                            obj.GetComponent <Image>().sprite = BetSpriteList[i];
                            //移动到这个位置
                            Tweener tweener = obj.GetComponent <Image>().transform.DOLocalMove
                                                  (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                               Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);
                        }
                    }
                }
                //更改座位上的财富值
                SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(holdGold);
            }
            else
            {
                for (int i = 0; i < ChipValueList.Length; i++)
                {
                    //根据金币数量生成筹码
                    if (ChipValueList[i] == betGold)
                    {
                        if (BetChipPos.childCount != 0)
                        {
                            for (int j = 0; j < BetChipPos.childCount; j++)
                            {
                                GameObject obj = BetChipPos.GetChild(j).gameObject;
                                if (obj.activeSelf == false)
                                {
                                    //更换图片
                                    obj.GetComponent <Image>().sprite = BetSpriteList[i];
                                    //移动到这个位置
                                    Tweener tweener = obj.transform.DOLocalMove
                                                          (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                                       Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);
                                    obj.SetActive(true);
                                    break;
                                }//说明是最后一个
                                else if (j == BetChipPos.childCount - 1)
                                {
                                    //重新生成
                                    GameObject clone = Instantiate(BetChip, BetChipPos);
                                    //更换图片
                                    clone.GetComponent <Image>().sprite = BetSpriteList[i];
                                    //移动到这个位置
                                    Tweener tweener = clone.transform.DOLocalMove
                                                          (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                                       Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);

                                    break;
                                }
                            }
                        }
                        else
                        {
                            //重新生成
                            GameObject obj = Instantiate(BetChip, BetChipPos);
                            //更换图片
                            obj.GetComponent <Image>().sprite = BetSpriteList[i];
                            //移动到这个位置
                            obj.transform.localPosition = PlayerIma.transform.localPosition;
                            Tweener tweener = obj.transform.DOLocalMove
                                                  (new Vector3(Random.Range(PostionModelList[betPosition - 1].XX, PostionModelList[betPosition - 1].DX),
                                                               Random.Range(PostionModelList[betPosition - 1].XY, PostionModelList[betPosition - 1].DY), 0), 0.01f);
                        }
                    }
                }
            }
        }
        DiceGameMove diceGameMove = MessageManager.GetInstance.GetUIDict <DiceGameMove>();

        diceGameMove.Betpeoplenum_RentalMove1(roomAllGold, betNum);
    }
Exemple #9
0
 //下注成功
 public void BetSucceed(GameDiceBetUpdateWeathDto betUpdateDto)
 {
     IsBack = false;
     BetGold(tempA);
     tempbetChange += betUpdateDto.betGold;
     if (tempbetChange >= 1000000000)
     {
         AudioManager.Instance.PlaySound("yazhuchaoguo1000wan");
         tempbetChange = 0;
     }
     //座位中有自己
     if (PlayerCache.SeatPlayerinfoDic.ContainsKey(PlayerCache.loginInfo.uid))
     {
         PlayerCache.SeatPlayerinfoDic.TryGetValue(PlayerCache.loginInfo.uid, out GameDicePositionPlayerInfoDto value);
         //更改座位上自己的钱数自己看
         SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(betUpdateDto.residueGold);
     }
     //自身剩余钱数
     PlayerGoldCount.text = betUpdateDto.residueGold.ToString();
 }
Exemple #10
0
    //中奖记录页面显示
    public void Awardshow(Game2JackpotListDto jackpotDtoList)
    {
        if (jackpotDtoList.jackpotList != null)
        {
            DebugUtils.DebugerExtension.Log(jackpotDtoList.jackpotList[0].winGold);
            if (jackpotDtoList.jackpotList.Count >= 0 && jackpotDtoList.jackpotList.Count < 11)
            {
                //生成记录
                for (int i = 0; i < jackpotDtoList.jackpotList.Count; i++)
                {
                    if (AwardRecordshow.childCount > 0)
                    {
                        for (int j = 0; j < AwardRecordshow.childCount; j++)
                        {
                            GameObject obj = AwardRecordshow.GetChild(j).gameObject;
                            if (obj.activeSelf == false)
                            {
                                obj.transform.GetChild(0).GetComponent <Text>().text = jackpotDtoList.jackpotList[i].userName;
                                obj.transform.GetChild(1).GetComponent <Text>().text = cardTypeList[jackpotDtoList.jackpotList[i].awardType - 1];

                                obj.transform.GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(jackpotDtoList.jackpotList[i].winGold);
                                obj.transform.gameObject.SetActive(true);
                                break;
                            }
                        }
                    }
                }
            }
        }
        //打开中奖记录页面
        awardRecordPanel.gameObject.SetActive(true);
        TouchPanel.gameObject.SetActive(true);
    }
Exemple #11
0
    IEnumerator Settleaator(GameRankingListDto tOSettleRanking)
    {
        yield return(new WaitForSeconds(1.5f));

        //结算页面显示
        SettleAccountsPanel.gameObject.SetActive(true);
        //反馈页面显示
        TouchPanel.gameObject.SetActive(true);
        //牌的类型和倍率胜负
        if (liuliu.tOCardsDtos != null)
        {
            for (int i = 0; i < 5; i++)
            {   //判断不是庄家
                if (liuliu.tOCardsDtos.cardDtoList[i].position != 0)
                {
                    if (liuliu.tOCardsDtos.cardDtoList[i].cardType < 1 || liuliu.tOCardsDtos.cardDtoList[i].cardType > 7)
                    {
                        DebugUtils.DebugerExtension.Log(this, "错了" + liuliu.tOCardsDtos.cardDtoList[i].cardType);
                    }
                    //类型
                    SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(0).GetComponent <Text>().text
                        = cardTypeList[liuliu.tOCardsDtos.cardDtoList[i].cardType - 1];
                    //倍率
                    SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(1).GetComponent <Text>().text
                        = dynameterList[liuliu.tOCardsDtos.cardDtoList[i].cardType - 1];
                    //筹码清空
                    SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(2).GetComponent <Text>().text
                        = "";
                    //胜负
                    if (liuliu.tOCardsDtos.cardDtoList[i].result == true)
                    {
                        SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(3).GetComponent <Text>().text
                            = "赢";
                        SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(3).GetComponent <Text>().color = new Color(0.9372f, 0.8627f, 0.3803f);
                    }
                    else
                    {
                        SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(3).GetComponent <Text>().text
                            = "输";
                        SettleaccountsAreaList[liuliu.tOCardsDtos.cardDtoList[i].position - 1].GetChild(3).GetComponent <Text>().color = new Color(0, 0, 0);
                    }
                }
                //是庄家
                else
                {  //庄家牌型
                    SettleAccountsPanel.GetChild(5).GetChild(0).GetComponent <Text>().text
                        = cardTypeList[liuliu.tOCardsDtos.cardDtoList[i].cardType - 1];
                }
            }
        }
        else
        {
            for (int i = 0; i < 4; i++)
            {
                //类型
                SettleaccountsAreaList[i].GetChild(0).GetComponent <Text>().text
                    = "散牌";
                //倍率
                SettleaccountsAreaList[i].GetChild(1).GetComponent <Text>().text
                    = "X1倍";
                //筹码清空
                SettleaccountsAreaList[i].GetChild(2).GetComponent <Text>().text
                    = "";
                //胜负
                SettleaccountsAreaList[i].GetChild(3).GetComponent <Text>().color = new Color(0, 0, 0);
                SettleaccountsAreaList[i].GetChild(3).GetComponent <Text>().text
                    = "赢";
            }
            //庄家牌型
            SettleAccountsPanel.GetChild(5).GetChild(0).GetComponent <Text>().text
                = "";
        }
        liuliu.tOCardsDtos = null;
        //筹码值
        foreach (int item in BetInfoDic.Keys)
        {
            long gold;
            BetInfoDic.TryGetValue(item, out gold);
            SettleaccountsAreaList[item - 1].GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(gold);
        }
        BetInfoDic.Clear();
        //排名
        if (tOSettleRanking.listDto != null)
        {
            tOSettleRanking.listDto.Sort((GameRankingDto b1, GameRankingDto b2) => { return(b2.winGold.CompareTo(b1.winGold)); });
            for (int i = 0; i < tOSettleRanking.listDto.Count; i++)
            {
                if (i < 3)
                {
                    SettleaccountsRankList[i].GetChild(0).GetComponent <Text>().text
                        = tOSettleRanking.listDto[i].userName;
                    SettleaccountsRankList[i].GetChild(1).GetComponent <Text>().text =
                        tOSettleRanking.listDto[i].winGold.ToString();
                }
            }
            tOSettleRanking.listDto.Clear();
        }
        //自己的输赢
        if (SelfGold < 0)
        {
            AudioManager.Instance.PlaySound("shule");
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(1).GetComponent <Text>().text
                = "输";
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(1).GetComponent <Text>().color
                = new Color(0, 0, 0);
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(2).GetComponent <Text>().text =
                (SelfGold * -1).ToString();
        }
        else if (SelfGold >= 0)
        {
            AudioManager.Instance.PlaySound("yingle");
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(1).GetComponent <Text>().text
                = "赢";
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(1).GetComponent <Text>().color
                = new Color(0.9372f, 0.8627f, 0.3803f);
            SettleAccountsPanel.GetChild(4).GetChild(3).GetChild(2).GetComponent <Text>().text =
                (SelfGold).ToString();
        }
        SelfGold = 0;
        //庄家输赢钱数
        if (BankerGold < 0)
        {
            SettleAccountsPanel.GetChild(5).GetChild(2).GetComponent <Text>().text
                = "输:";
            SettleAccountsPanel.GetChild(5).GetChild(2).GetComponent <Text>().color
                = new Color(0.98431f, 0.9647f, 0.8549f);
            SettleAccountsPanel.GetChild(5).GetChild(1).GetComponent <Text>().text
                = (BankerGold * -1).ToString();
        }
        else
        {
            SettleAccountsPanel.GetChild(5).GetChild(2).GetComponent <Text>().text
                = "赢:";
            SettleAccountsPanel.GetChild(5).GetChild(2).GetComponent <Text>().color
                = new Color(0, 0, 0);
            SettleAccountsPanel.GetChild(5).GetChild(1).GetComponent <Text>().text
                = BankerGold.ToString();
        }
        BankerGold = 0;
        if (SettleaatorCoroutine != null)
        {
            ILMgr.Instance.StopCoroutine(SettleaatorCoroutine);
            SettleaatorCoroutine = null;
        }
    }
Exemple #12
0
    public void OtherBet(long betUid, long reduceGold, long betGold, int betPosition)
    {
        AudioManager.Instance.PlaySound("selfbet");
        if (betUid != PlayerCache.loginInfo.uid)
        {
            for (int i = 0; i < chipgoldList.Count; i++)
            {
                //根据金币数量生成筹码
                if (betGold <= chipgoldList[i])
                {
                    for (int j = 0; j < i + 1; j++)
                    {
                        if (BankerChipPos.childCount > 0)
                        {
                            for (int k = 0; k < BankerChipPos.childCount; k++)
                            {
                                GameObject clone = BankerChipPos.GetChild(k).gameObject;
                                if (clone.activeSelf == false)
                                {
                                    clone.transform.localPosition = OtherInfoBtn.transform.localPosition;
                                    Tweener tweener = clone.transform.DOLocalMove
                                                          (new Vector3(UnityEngine.Random.Range(-240 + (betPosition - 1) * 200,
                                                                                                -90 + (betPosition - 1) * 200), UnityEngine.Random.Range(-75, 75), 0), 0.2f);
                                    clone.SetActive(true);
                                    break;
                                }
                                else if (k == BankerChipPos.childCount - 1)
                                {
                                    if (k >= 320)
                                    {
                                        for (int x = 0; x < 300; x++)
                                        {
                                            int y = Random.Range(0, 300);
                                            if (BankerChipPos.GetChild(y).gameObject.activeSelf)
                                            {
                                                BankerChipPos.GetChild(y).gameObject.SetActive(false);
                                            }
                                            else
                                            {
                                                break;
                                            }
                                        }
                                    }
                                    GameObject obj = Instantiate(GoldChip, BankerChipPos);
                                    //筹码移动
                                    obj.transform.localPosition = OtherInfoBtn.transform.localPosition;
                                    Tweener tweener = obj.transform.DOLocalMove
                                                          (new Vector3(UnityEngine.Random.Range(-240 + (betPosition - 1) * 200,
                                                                                                -90 + (betPosition - 1) * 200), UnityEngine.Random.Range(-75, 75), 0), 0.2f);
                                    break;
                                }
                            }
                        }
                        else
                        {
                            GameObject obj = Instantiate(GoldChip, BankerChipPos);
                            //筹码移动
                            obj.transform.localPosition = OtherInfoBtn.transform.localPosition;
                            Tweener tweener = obj.transform.DOLocalMove
                                                  (new Vector3(UnityEngine.Random.Range(-240 + (betPosition - 1) * 200,
                                                                                        -90 + (betPosition - 1) * 200), UnityEngine.Random.Range(-75, 75), 0), 0.2f);
                        }
                    }
                    break;
                }
            }
        }
        Text temp = betArea.GetChild(betPosition - 1).GetChild(0).GetComponent <Text>();

        //投注区显示
        if (betPosition == 1)
        {
            other0searcount = other0searcount + betGold;
            temp.text       = NumberConvert.ConvertW(other0searcount);
        }
        else if (betPosition == 2)
        {
            other1searcount = other1searcount + betGold;
            temp.text       = NumberConvert.ConvertW(other1searcount);
        }
        else if (betPosition == 3)
        {
            other2searcount = other2searcount + betGold;
            temp.text       = NumberConvert.ConvertW(other2searcount);
        }
        else if (betPosition == 4)
        {
            other3searcount = other3searcount + betGold;
            temp.text       = NumberConvert.ConvertW(other3searcount);
        }
    }
Exemple #13
0
 public void BetInfo(Game2BetUpdateWeathDto betUpdateDto)
 {
     IsBack = false;
     BetGold(TempArea);
     tempBetGold += betUpdateDto.betGold;
     yiqianwan   += betUpdateDto.betGold;
     if (yiqianwan >= 1000000000)
     {
         AudioManager.Instance.PlaySound("yazhuchaoguo1000wan");
         yiqianwan = 0;
     }
     PlayerCache.loginInfo.gold = betUpdateDto.reduceGold;
     //显示剩余钱数
     PlayerGoldCount.text = betUpdateDto.reduceGold.ToString();
     for (int i = 1; i < 5; i++)
     {
         if (betUpdateDto.betPosition == i)
         {
             if (betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text == "点击下注")
             {
                 betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = "0";
                 if (i == 1)
                 {
                     bet0searcount = betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet0searcount);
                 }
                 else if (i == 2)
                 {
                     bet1searcount = betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet1searcount);
                 }
                 else if (i == 3)
                 {
                     bet2searcount = betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet2searcount);
                 }
                 else if (i == 4)
                 {
                     bet3searcount = betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet3searcount);
                 }
             }
             else
             {
                 if (i == 1)
                 {
                     bet0searcount = bet0searcount + betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet0searcount);
                 }
                 else if (i == 2)
                 {
                     bet1searcount = bet1searcount + betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet1searcount);
                 }
                 else if (i == 3)
                 {
                     bet2searcount = bet2searcount + betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet2searcount);
                 }
                 else if (i == 4)
                 {
                     bet3searcount = bet3searcount + betUpdateDto.betGold;
                     betArea.GetChild(i - 1).GetChild(1).GetComponent <Text>().text = NumberConvert.ConvertW(bet3searcount);
                 }
             }
         }
     }
 }
Exemple #14
0
    public void UpdateUIData(RankingListDto rankingListDto)
    {
        if (rankingListDto != null)
        {
            List <RankingBaseDto> rankList = rankingListDto.list;
            if (rankList.Count > 0)
            {
                Transform trans = transform.Find("ScrollRect/viewer/Content");


                for (int i = 0; i < rankList.Count; i++)
                {
                    //DebugUtils.DebugerExtension.Log(this,"财富榜:" + rankList[i].Uid);
                    Transform temp = trans.Find(rankList[i].uid.ToString());
                    if (temp != null)
                    {
                        continue;
                    }


                    GameObject go;
                    GameObject obj;

                    if (i < 3)
                    {
                        go  = GameTools.Instance.GetObject("Prefabs/Rank/goldRankItem");
                        obj = Instantiate(go);

                        Sprite sprite = GameTools.Instance.GetSpite("Sprite/Rank/new_rank_no" + (i + 1));
                        obj.transform.GetChild(0).GetComponent <Image>().sprite = sprite;
                    }
                    else
                    {
                        go  = GameTools.Instance.GetObject("Prefabs/Rank/goldRankItem2");
                        obj = Instantiate(go);
                        obj.transform.GetChild(0).GetComponent <Text>().text = (i + 1).ToString();
                    }
                    obj.transform.SetParent(trans);
                    obj.transform.localScale = Vector3.one;
                    obj.name = rankList[i].uid.ToString();
                    //头像
                    //头像显示
                    Image headimg = obj.transform.GetChild(1).GetComponent <Image>();
                    LoadHeadImgUtils.Instance.LoadHeadImg(headimg, rankList[i].headImgUrl);
                    //用户名
                    obj.transform.GetChild(1).GetChild(0).GetComponent <Text>().text = rankList[i].userName;
                    if (rankList[i].vipLv > 0)
                    {
                        //vip 等级
                        Sprite s = GameTools.Instance.GetSpriteAtlas("Sprite/Vip/VipAtlas1", "new_rank_vip" + rankList[i].vipLv);
                        obj.transform.GetChild(1).GetChild(1).GetComponent <Image>().sprite = s;
                    }
                    else if (rankList[i].vipLv == 0)
                    {
                        obj.transform.GetChild(1).GetChild(1).gameObject.SetActive(false);
                    }


                    //财富
                    obj.transform.GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(rankList[i].showWeath);
                    //座驾
                    Sprite sp = GameTools.Instance.GetSpite("Sprite/Shop/car/" + rankList[i].useAutoId);
                    obj.transform.GetChild(3).GetComponent <Image>().sprite = sp;
                    if (rankList[i].useAutoId == 0)
                    {
                        obj.transform.GetChild(3).GetComponent <Image>().color = new Color(255, 255, 255, 0);
                    }
                    int j = i;

                    obj.GetComponent <Button>().onClick.AddListener(delegate() { this.ClickRankPlayer(rankList[j].uid); });
                }
            }
        }
    }
Exemple #15
0
 /// <summary>
 /// 更新房间投注信息
 /// </summary>
 /// <param name="nowBetPlayerNumber"></param>
 /// <param name="nowLotteryAllGold"></param>
 public void UpdateRoomBetInfo(int nowBetPlayerNumber, long nowLotteryAllGold)
 {
     playerNum.text   = nowBetPlayerNumber + "人";
     NowBetMoney.text = NumberConvert.ConvertW(nowLotteryAllGold);
 }
Exemple #16
0
    /// <summary>
    /// 进入房间,更新信息
    /// </summary>
    /// <param name="info"></param>
    public void InRoom(LotteryRoomInfoDto info)
    {
        //if (info.residueTime > 10)
        //{
        //    StartTimeDown(info.residueTime - 10);
        //}
        //else if (info.residueTime >= 7)
        //{
        //    stopBet.gameObject.SetActive(true);
        //    AHEndTxt.gameObject.SetActive(false);
        //}
        //else
        //{
        //    stopBet.gameObject.SetActive(false);
        //    AHEndTxt.gameObject.SetActive(true);
        //}

        //if (info.historyDtos != null)
        //{

        //    lastTimeGrantAward.text = NumberConvert.ConvertW(info.lastTimeGrantAward);
        //    playerNum.text = info.playerNum + "人";
        //    NowBetMoney.text = NumberConvert.ConvertW(info.nowBetMoney);
        //    if (info.historyDtos.Count > 0)
        //    {
        //        LastResult.text = GameTools.GetCardType(info.historyDtos[0].result) + "  " + GameTools.GetDoubleOrSingle(info.historyDtos[0].oddEnven);
        //    }

        //    PlayerCache.historyList.Clear();
        //    for (int i = 0; i < info.historyDtos.Count; i++)
        //    {
        //        AHResult AHResultItem = new AHResult();
        //        AHResultItem.OddEnven = info.historyDtos[i].oddEnven;
        //        AHResultItem.Result = info.historyDtos[i].result;
        //        PlayerCache.historyList.Add(AHResultItem);
        //    }

        //    HandleHistory(PlayerCache.historyList);
        //}

        if (info.residueTime > 10)
        {
            StartTimeDown(info.residueTime - 10);
        }
        else if (info.residueTime >= 7)
        {
            stopBet.gameObject.SetActive(true);
            AHEndTxt.gameObject.SetActive(false);
        }
        else
        {
            stopBet.gameObject.SetActive(false);
            AHEndTxt.gameObject.SetActive(true);
        }
        lastTimeGrantAward.text = NumberConvert.ConvertW(info.lastTimeGrantAward);
        playerNum.text          = info.playerNum + "人";
        NowBetMoney.text        = NumberConvert.ConvertW(info.nowBetMoney);
        if (info.historyDtos != null)
        {
            LastResult.text = GameTools.GetCardType(info.historyDtos.result);
        }
    }