feat(Card): 卡牌基本框架,尚未测试
This commit is contained in:
@@ -4,10 +4,23 @@ namespace Card
|
||||
{
|
||||
public class Card
|
||||
{
|
||||
private CardConfig cardConfig;
|
||||
|
||||
public Sprite Sprite => cardConfig.CardIcon;
|
||||
public string CardName => cardConfig.CardName;
|
||||
public string CardDescription => cardConfig.CardDescription;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user