示例#1
0
 /// <summary>
 /// 小结算
 /// </summary>
 /// <param name="data"></param>
 public void NetOnSmallSettle(NNonSmallSettle data)
 {
     mSelfPlayer.SetLiangCardBtnState(false);
     if (mNiuniuCoinFlyWidget == null)
     {
         mNiuniuCoinFlyWidget = BaseView.GetWidget <NiuniuCoinFlyWidget>(AssetsPathDic.NiuniuCoinFlyWidget, transform);
     }
     ShowLastTime("准备倒计时", data.lastTime);
     StartCoroutine(OnSmallSettle(data));
 }
示例#2
0
    /// <summary>
    /// 同步小结算
    /// </summary>
    /// <param name="data"></param>
    private IEnumerator OnSmallSettle(NNonSmallSettle data)
    {
        List <int> winList  = new List <int>();
        List <int> loseList = new List <int>();

        yield return(new WaitForSeconds(1.5f));

        FlySmallSettleCoin(data.winList);

        yield return(new WaitForSeconds(1.0f));

        FlySmallSettleCoin(data.lostList);

        NiuniuPlayerUI player = null;

        if (data.scoreList != null)
        {
            for (int i = 0; i < data.scoreList.Count; i++)
            {
                if (TryGetPlayer(data.scoreList[i].seatId, out player))
                {
                    player.SetWinLoseScore(data.scoreList[i].score);
                }
            }
        }

        if (data.lastScore != null)
        {
            for (int i = 0; i < data.lastScore.Count; i++)
            {
                UpdatePlayerScore(data.lastScore[i].seatId, data.lastScore[i].score);
                if (data.lastScore[i].seatId == NiuniuModel.Inst.mMySeatId)
                {
                    UpdateTotalWinScore(data.lastScore[i].totalWin);
                }
            }
        }

        DelayRun(5.0f, () => {
            mSelfPlayer.SetReadybtnState(true);
            if (NiuniuModel.Inst.mGoldPattern)
            {
                mSelfPlayer.SetChangDeskBtnState(true);
            }
            else
            {
                mSelfPlayer.SetChangDeskBtnState(false);
            }
            CleanDesk();
        });
    }
示例#3
0
    /// <summary>
    /// 同步小结算
    /// </summary>
    private void NetOnSmallSettle(MessageData msg)
    {
        NNonSmallSettle ack = msg.Read <NNonSmallSettle>();

        mView.NetOnSmallSettle(ack);
    }