Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Evernite.GameSettings;
  5.  
  6. public class TestBehaviour : MonoBehaviour
  7. {
  8.     [SerializeField] private CardPool cardpool;
  9.     private CardInDeckEditorPrefabSetting cardInDeckSetting;
  10.  
  11.     private void Awake()
  12.     {
  13.         cardInDeckSetting = EverniteGameSettings.GetSetting<CardInDeckEditorPrefabSetting>();
  14.     }
  15.  
  16.     public GameObject GetDeckInEditPrefab(CardUnit card)
  17.     {
  18.         var id = card.GetDefaultAttributes<BaseCardAttributes>().ID;
  19.         var cardInfo = cardpool.GetCardInfo(id);
  20.         return cardInDeckSetting.GetCardPrefabForDeckEditor(cardInfo);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement