Quantcast
Channel: Questions in topic: "item"
Viewing all articles
Browse latest Browse all 274

Need assistance with SubType in custom class (UnityScript or C#)

$
0
0
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.

Viewing all articles
Browse latest Browse all 274

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>