Advertisement
LittleAngel

enum example

Apr 12th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public enum SlotType {Head, Chest, Waist, Legs, Feet, Back, Neck, Hands, Ring, MainHand, OffHand, Bag, Empty}
  2. public enum ItemType {Weapon, Clothing, Consumable, Container}
  3.  
  4.  
  5. [System.Serializable] // Our Representation of an InventoryItem
  6. public class InventoryItem {
  7. public string itemName = "New Item"; // What the item will be called in the inventory
  8. public Texture2D itemIcon = null; // What the item will look like in the inventory
  9. public SlotType slotType = SlotType.Bag; // What slot the item will fit in
  10. public ItemType itemType = ItemType.Consumable; // What type of item it is - primarily for the Editor Window
  11. public int containerSize = 0; // The number of "slots" or "spaces" in the container
  12.  
  13.  
  14. etc etc...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement