feat(): 大量更新
This commit is contained in:
26
Assets/Script/Gameplay/Card/Card.cs
Normal file
26
Assets/Script/Gameplay/Card/Card.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Gameplay
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user