39 lines
1 KiB
C#
39 lines
1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public enum CardType {
|
|
Action
|
|
}
|
|
|
|
public abstract class BaseCard
|
|
{
|
|
private CardId id;
|
|
private string displayName;
|
|
private int cost;
|
|
private CardType type;
|
|
private string effectText;
|
|
|
|
public BaseCard(CardId id, string displayName, int cost, CardType type, string effectText) {
|
|
this.id = id;
|
|
this.displayName = displayName;
|
|
this.cost = cost;
|
|
this.type = type;
|
|
this.effectText = effectText;
|
|
}
|
|
|
|
public abstract IEnumerator Use(BattlePlayerControls playerControls);
|
|
|
|
public CardId GetId() {return id;}
|
|
public string GetDisplayName() {return displayName;}
|
|
public int GetCost() {return cost;}
|
|
public string GetDisplayType() {
|
|
switch (type) {
|
|
case CardType.Action:
|
|
return "";
|
|
default:
|
|
throw new System.ArgumentException("CardType unknown", "cardType");
|
|
}
|
|
}
|
|
public string GetEffectText() {return effectText;}
|
|
}
|