I have set up a simple item class that holds all the basic information of every item in my game(Name, Prefab path, Icon, Type, etc.) and I'm trying to work in subtypes. Currently the Type is a short enum {weapon, armor, material, item, misc}.
**What I want to have is something in the class script that says "if Type.weapon, SubType enum {oneHandMelee, twoHandMelee, shield, oneHandRanged, etc.}, else if Type.armor, SubType enum {helm, cuirass, greaves, etc}.**
I understand the basics, just finished my first semester of college Scripting in Unity, I'm just not sure doing this is as simple as I think it should be. Any assistance from Coding veterans would be greatly appreciated.
↧