public void SetStats(CardStatsType type, int value) { switch (type) { case CardStatsType.Hp: Stats.Hp = value; break; case CardStatsType.Atk: Stats.Atk = value; break; case CardStatsType.Metal: Stats.Metal = value; break; case CardStatsType.Crystal: Stats.Crystal = value; break; case CardStatsType.Deuterium: Stats.Deuterium = value; break; default: throw new ArgumentOutOfRangeException(type.GetType().Name, type, null); } }
public int GetStats(CardStatsType type) { switch (type) { case CardStatsType.Hp: return(Stats.Hp); case CardStatsType.Atk: return(Stats.Atk); case CardStatsType.Metal: return(Stats.Metal); case CardStatsType.Crystal: return(Stats.Crystal); case CardStatsType.Deuterium: return(Stats.Deuterium); default: throw new ArgumentOutOfRangeException(type.GetType().Name, type, null); } }