Пример #1
0
 public static CardDataHelper getInstance()
 {
     if (_instance == null)
     {
         _instance = new CardDataHelper();
     }
     return(_instance);
 }
Пример #2
0
    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);
        }
    }