public PowerCtrl(CardTypes type, Power p) { InitializeComponent(); power = p; this.type = type; LoadData(); }
public PowerCtrl(CardTypes type, out Power t) { InitializeComponent(); this.type = type; switch (type) { case CardTypes.AtWill: power = new AtWill(); break; case CardTypes.Encounter: power = new Encounter(); break; case CardTypes.Daily: power = new Daily(); break; default: throw new InvalidOperationException("Unsupported CardType"); } t = power; }