Ejemplo n.º 1
0
    /// <summary>
    /// 同步玩家亮牌
    /// </summary>
    /// <param name="data"></param>
    private IEnumerator OnPlayerLiangCard(TenOnPlayerOptResult data)
    {
        bool isSelf = (data.seatId == TenModel.Inst.mMySeatId);

        if (isSelf)
        {
            TenModel.Inst.mLookCard = true;
            mSelfPlayer.HideLiangCuoState();
            if (BaseView.childrenWidgetDic.ContainsKey(typeof(TenCuoCardWidget).Name))
            {
                BaseViewWidget.CloseWidget <TenCuoCardWidget>();
            }
        }


        TenPlayerUI player = null;

        if (TryGetPlayer(data.seatId, out player))
        {
            if (player.GetTurnState())
            {
                yield break;
            }
            player.TurnCards(data.cards);
            yield return(new WaitForSeconds(0.7f));

            player.SeparateCards(data.cardsType.order);

            player.SetCardType(true, data.cardsType.point, data.cardsType.ratio, isSelf);
        }
    }