Example #1
0
        IEnumerator CardValueForStart()
        {
            if (MyCardsValueList.Count != CardItemList.Count)
            {
                YxDebug.LogError("手牌与手牌值长度不相等,手牌数为:" + CardItemList.Count + ",值的数量为:" + MyCardsValueList.Count + "手牌值为:");
            }
            for (int i = 0; i < MyCardsValueList.Count; i++)
            {
                CardItemList[i].Value = MyCardsValueList[i];
                CardItemList[i].SetCardDepth(i);
                yield return(new WaitForSeconds(0.005f));
            }

            FreshHandCard(null);
            CardsArea.GetComponent <UIGrid>().Reposition();
            if (GetInfo <JlGameUserInfo>().ActiveCards != null)
            {
                FreshHandCard(GetInfo <JlGameUserInfo>().ActiveCards);

                GetInfo <JlGameUserInfo>().ActiveCards = null;
                if (!GetInfo <JlGameUserInfo>().IsCurSpeaker)
                {
                    NoCanClickCard();
                }
            }
            if (GetInfo <JlGameUserInfo>().IsTrusteeship)
            {
                ShowTrusteeshipObj(true);
            }

            if (TrusteeshipObj.GetComponent <UIButton>().onClick.Count == 0)
            {
                TrusteeshipObj.GetComponent <UIButton>().onClick.Add(RejoinFresh);
            }
        }
Example #2
0
 public override void OutCard(JlGameOutCardsArea outCardsArea, int cardVaule)
 {
     for (int i = 0; i < CardItemList.Count; i++)
     {
         if (CardItemList[i].Value == cardVaule)
         {
             outCardsArea.FromHandToOutArea(CardItemList[i]);
             MyCardsValueList.Remove(cardVaule);
             CardItemList.Remove(CardItemList[i]);
             CardsArea.GetComponent <UIGrid>().repositionNow = true;
         }
     }
 }
Example #3
0
        public void FoldCard(int card)
        {
            for (int i = 0; i < CardItemList.Count; i++)
            {
                if (CardItemList[i].Value == card)
                {
                    CardItemList[i].SetCardDeath();
//                    CardItemList[i].IsFoldCard = false;
                    FromHandToFoldArea(CardItemList[i]);
                    MyCardsValueList.Remove(card);
                    CardItemList.Remove(CardItemList[i]);
                }
            }
            CardsArea.GetComponent <UIGrid>().repositionNow = true;
        }