C
CSharp-Jay
So I am creating a playful little game engine. And in my BaseItem
class I have this:
protected string name; // Item name
protected enum itemType { Armor, Helmet, Shield, Sword }; //
Item type
protected int value; // Item value (Attack Power or Defense)
But I can't for the life of me figure out how I would do the
overloaded constructor using an enum? I might not be doing it right
since I don't know much about enums. But in this case an enum seems
appropriate to differentiate armor from weapons you know? Please let
me know!
class I have this:
protected string name; // Item name
protected enum itemType { Armor, Helmet, Shield, Sword }; //
Item type
protected int value; // Item value (Attack Power or Defense)
But I can't for the life of me figure out how I would do the
overloaded constructor using an enum? I might not be doing it right
since I don't know much about enums. But in this case an enum seems
appropriate to differentiate armor from weapons you know? Please let
me know!