public static CardDataHelper getInstance() { if (_instance == null) { _instance = new CardDataHelper(); } return(_instance); }
public PlayerCard(long cardId, int baseId) { cardInstanceId = cardId; GameObject cardPrefab = ResManager.getInstance().LoadPrefab(CARD_PREFAB_RAW_PATH); if (cardPrefab != null) { cardObject = GameObject.Instantiate(cardPrefab); cardObject.name = "Card" + cardId; cardItem = cardObject.AddComponent <TestDeckCardItem>(); cardData = CardDataHelper.getInstance().getCardById(baseId); cardItem.SetCardInfo(this); } }