mixedcards/Assets/Battle/CardDatabase.cs
2020-09-19 00:55:36 -04:00

23 lines
518 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum CardId {
CrashingPunch,
Cover
}
public class CardDatabase
{
public static BaseCard CreateCard(CardId id) {
switch (id)
{
case CardId.CrashingPunch:
return new CardCrashingPunch();
case CardId.Cover:
return new CardCover();
default:
throw new System.ArgumentException("CardId unknown", "id");
}
}
}