예제 #1
0
 public virtual void ShowLiangPaiAtGameEnd(List <int> ShowCards, bool zimo, int huCard = 0)
 {
     if (zimo)
     {
         ShowCards.Remove(huCard);
     }
     HandCardList = ShowCards.ToList();
     if (huCard > 0)
     {
         if (OnGetNewCard())
         {
             MahjongEnv.LastGetInMahjong.Value = huCard;
         }
         else
         {
             MahjongEnv.AddHandCard(huCard, true, false);
         }
         MahjongEnv.LastGetInMahjong.SetHuTag();
     }
     ShowCardList =
         GameTools.SortCardWithLaiZi(HandCardList, App.GetGameManager <Lyzz2DGameManager>().LaiZiNum).ToList();
     LostToken();
     RefresheShow(false);
     DoShowLiang();
 }
예제 #2
0
        public virtual MahjongItem AddHandCard(int value, bool isSingle, bool needRefresh)
        {
            var item = MahjongEnv.AddHandCard(value, isSingle).GetComponent <MahjongItem>();

            if (item != null)
            {
                return(item);
            }
            YxDebug.LogError(string.Format("新增了一张牌,没有创建成功,牌是{0},值是:{1}", (EnumMahjongValue)value, value));
            return(null);
        }
예제 #3
0
 public virtual void TraAddLastGetInCard()
 {
     if (_mahJongEnv.LastGetInMahjong != null)
     {
         var item = _mahJongEnv.LastGetInMahjong;
         if (item != null)
         {
             MahjongEnv.AddHandCard(item);
             _mahJongEnv.LastGetInMahjong = null;
         }
     }
 }