26 lines
654 B
C#
26 lines
654 B
C#
using UnityEngine;
|
|
|
|
namespace Card
|
|
{
|
|
public class Card
|
|
{
|
|
private CardData _cardData;
|
|
public Texture Texture => _cardData.CardTexture;
|
|
public string CardName => _cardData.CardName;
|
|
public string CardDescription => _cardData.CardDescription;
|
|
public EffectData[] Effects => _cardData.Effects;
|
|
|
|
public Card(CardData cardData)
|
|
{
|
|
_cardData = cardData;
|
|
}
|
|
|
|
public void PlayCard(CardContext context)
|
|
{
|
|
foreach (var effect in Effects)
|
|
{
|
|
EffectHandler.Execute(effect, context);
|
|
}
|
|
}
|
|
}
|
|
} |