Ejemplo n.º 1
0
        protected virtual void ToSelectTingOut()
        {
            List <int> outList   = Manager.TingOutCards;
            var        tingCount = outList.Count;

            if (tingCount == 1)
            {
                var         tingValue  = outList[0];
                MahjongItem selectItem = GetHandCard(tingValue);
                if (selectItem)
                {
                    OnMahjongClick(selectItem.transform);
                }
            }
            else
            {
                MahjongEnv.SetHandCardsInvalid();
                InteraptMenu.Instance.Revert();
                InteraptMenu.Instance.ShowTing(true);
                for (int i = 0; i < tingCount; i++)
                {
                    int         checkValue = outList[i];
                    MahjongItem selectItem = GetHandCard(checkValue);
                    if (selectItem != null)
                    {
                        selectItem.SetColor(Color.white);
                        AddUserControl(selectItem);
                    }
                    else
                    {
                        YxDebug.LogError(string.Format("TingOut牌中的牌:{0}值是:{1},不存在于实际手牌中", (EnumMahjongValue)checkValue, checkValue));
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected virtual List <Transform> SetHandCardsValid(Predicate <Transform> match)
        {
            MahjongEnv.SetHandCardsInvalid();
            var matchList = MahjongEnv.HandCards.FindAll(match);

            MahjongEnv.SetItemsColor(Color.white, matchList);
            foreach (var matchItem in matchList)
            {
                AddUserControl(matchItem);
            }
            return(matchList);
        }
Ejemplo n.º 3
0
 public override void ShowTingWithEffect(bool withEffect)
 {
     base.ShowTingWithEffect(withEffect);
     MahjongEnv.SetHandCardsInvalid();
 }