Esempio n. 1
0
    //派发金币
    private void SendBet(GameRankingListDto tOSettleRanking)
    {
        if (liuliu.SelfWeathDto != null)
        {
            if (liuliu.SelfWeathDto[1] > 0)
            {
                if (generatePos.childCount > 0)
                {
                    for (int i = 0; i < generatePos.childCount; i++)
                    {
                        GameObject obj     = generatePos.GetChild(i).gameObject;
                        Tweener    tweener = obj.transform.DOLocalMove
                                                 (new Vector3(PlayerIma.transform.localPosition.x, PlayerIma.transform.localPosition.y), 0.5f);
                    }
                }
            }
        }
        AudioManager.Instance.PlaySound("g2");
        if (BankerChipPos.childCount > 0)
        {
            for (int i = 0; i < BankerChipPos.childCount; i++)
            {
                GameObject obj     = BankerChipPos.GetChild(i).gameObject;
                Tweener    tweener = obj.transform.DOLocalMove
                                         (new Vector3(OtherInfoBtn.transform.localPosition.x + 100, OtherInfoBtn.transform.localPosition.y), 0.5f);
            }
        }
        GameMove gameMove = MessageManager.GetInstance.GetUIDict <GameMove>();

        AudioManager.Instance.PlaySound("g2");
        gameMove.Settleaccounts(tOSettleRanking);
    }
Esempio n. 2
0
    //结算延迟协程
    IEnumerator Closean(GameRankingListDto tOSettleRanking)
    {
        yield return(new WaitForSeconds(4.8f));

        //收筹码
        GrandBet();
        //发筹码
        SendBet(tOSettleRanking);
        //清空桌上的筹码和投注量以及个人投注量
        Clear(1);
    }
Esempio n. 3
0
        //结算消息排行
        public override void ranking(GameRankingListDto dto)
        {
            UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>();

            if (dto != null)
            {
                if (uIWanRenChan != null)
                {
                    uIWanRenChan.Closeanaccount(dto);
                }
            }
        }
Esempio n. 4
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;
        }
    }
Esempio n. 5
0
 //游戏结算
 public void Settleaccounts(GameRankingListDto tOSettleRanking)
 {
     SettleaatorCoroutine = ILMgr.Instance.StartCoroutine(Settleaator(tOSettleRanking));
 }
Esempio n. 6
0
 //结算调用
 public void Closeanaccount(GameRankingListDto tOSettleRanking)
 {
     CloseanCoroutine = ILMgr.Instance.StartCoroutine(Closean(tOSettleRanking));
 }
 /// <summary>
 /// 结算之后的排行
 /// </summary>
 public virtual void ranking(GameRankingListDto dto)
 {
 }