示例#1
0
        /// <summary>
        /// 发一张牌,无过程
        /// </summary>
        /// <param name="to"></param>
        /// <param name="cardValue"></param>
        /// <param name="depth"></param>
        /// <returns></returns>
        protected virtual void DealOnes(Transform to, int cardValue = 0, int depth = 0)
        {
            GameObject gob = Instantiate(PokerPrefab);

            gob.transform.parent        = to;
            gob.transform.localScale    = Vector3.one;
            gob.transform.localScale   *= 1 / to.localScale.x;
            gob.transform.localPosition = Vector3.zero;
            PokerCard pCard = gob.GetComponent <PokerCard>();

            pCard.SetCardDepth(100 + depth * 2);
            pCard.SetCardId(cardValue);
            pCard.SetCardFront();
            if (PublicCardId > 0)
            {
                pCard.SetPublicMarkActive(PublicCardId == cardValue);
            }
            App.GetGameManager <FillpitGameManager>().PublicPokers.Add(pCard);
        }