Add CrashingPunch and making it work

This commit is contained in:
henriquenakashima 2020-09-18 23:33:57 -04:00
parent 1c3056778e
commit d7c19e2572
15 changed files with 204 additions and 27 deletions

43
Assets/Battle/BaseCard.cs Normal file
View 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;}
}