public void SetCardDataUI(int cardNum, int handIndex) { if (mCardNum != cardNum) { mCardNum = cardNum; mJoyLandlordsCard.SetCardDataUI(mCardNum); } mHandIndex = handIndex; }
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); }