Example #1
0
    private void CheckSelfAddCardFunc(List <Int64> list, List <Int64> RevealCardList, Int64 mopai)
    {
        Int64 cardID      = 0;
        int   num         = 3;
        int   canGangCard = CardRules.CheckBySelfAddCardIsCanGang(list, mopai, laizi, GetLaizipi(laizi));

        if (canGangCard != 0)
        {
            num++;
            cardID = canGangCard;
        }

        if (CardRules.PopEnable(RevealCardList, mopai, GetLaizipi(laizi)) == 3)//检测回头笑的情况
        {
            num++;
            cardID = mopai;
        }

        if (CardRules.IsHupai(list, laizi, mopai, gameRule))
        {
            num += 2;;
        }
        if (num != 3)
        {
            EventDispatcher.GetInstance().UIFrameWorkEventManager.TriggerEvent <Int64, Int64>(EventId.SelfCanPengOrGang, num, cardID);//自己摸牌判断是否可以用杠
        }
    }
Example #2
0
    /// <summary>
    /// 自己碰了后检测自己是否可以杠
    /// </summary>
    public void CheckSelfCanAnGang()
    {
        PlayerData data        = _infoList[(int)selfOrderIndex - 1];
        int        canGangCard = CardRules.CheckBySelfAddCardIsCanGang(data.HandCardList, 0, laizi, GetLaizipi(laizi));

        if (canGangCard != 0)
        {
            EventDispatcher.GetInstance().UIFrameWorkEventManager.TriggerEvent <Int64, Int64>(EventId.SelfCanPengOrGang, 4, canGangCard);
        }
    }