Add CrashingPunch and making it work
This commit is contained in:
parent
1c3056778e
commit
d7c19e2572
15 changed files with 204 additions and 27 deletions
43
Assets/Battle/BaseCard.cs
Normal file
43
Assets/Battle/BaseCard.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public enum CardId {
|
||||
CrashingPunch
|
||||
}
|
||||
|
||||
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;}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue