예제 #1
0
 public void SetCardDataUI(int cardNum, int handIndex)
 {
     if (mCardNum != cardNum)
     {
         mCardNum = cardNum;
         mJoyLandlordsCard.SetCardDataUI(mCardNum);
     }
     mHandIndex = handIndex;
 }
예제 #2
0
        public static JoyLandlordsCard Create(int cardPrefabType, int cardNum, Transform parenTransform)
        {
            JoyLandlordsCard joyLandlordsCard = ComponentFactory.Create <JoyLandlordsCard>();

            if (mCardPrefabDic == null)
            {
                InitCardPrefab();
            }
            joyLandlordsCard.pCardPrefabType = cardPrefabType;
            joyLandlordsCard.Init(GameObject.Instantiate(mCardPrefabDic[cardPrefabType], parenTransform));
            joyLandlordsCard.SetCardDataUI(cardNum);
            return(joyLandlordsCard);
        }