23 lines
518 B
C#
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");
|
|
}
|
|
}
|
|
}
|