Create CardDatabase

This commit is contained in:
henriquenakashima 2020-09-19 00:34:27 -04:00
parent 18cfff1135
commit 246b2471f4
6 changed files with 50 additions and 17 deletions

View file

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