Advertisement
Guest User

Item Class

a guest
Jul 31st, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. [System.Serializable]
  5. public class Item
  6. {
  7.     public string itemName;
  8.     public string itemDescription;
  9.     public int itemID;
  10.     public Texture2D itemIcon;
  11.     public ItemType itemTypes;
  12.     public Rarity itemRarity;
  13.     public int itemValue;
  14.     public string itemFlavorText;
  15.  
  16.  
  17.     public enum Rarity
  18.     {
  19.         Common,
  20.         Uncommon,
  21.         Rare,
  22.         Exclusive
  23.     }
  24.    
  25.     public enum ItemType
  26.     {
  27.         Weapon,
  28.         Consumable,
  29.         Armor,
  30.         Quest,
  31.         CraftingMaterial,
  32.         Jewelry,
  33.         Junk,
  34.         SkillBook,paste
  35.         StatBook
  36.     }
  37.  
  38.     public Item(int id, string name, string desc, ItemType type, Rarity rarity, int value, string flavor)
  39.     {
  40.         itemID = id;
  41.         itemName = name;
  42.         itemDescription = desc;
  43.         itemIcon = Resources.Load<Texture2D>("Item Icons/" + ItemName);
  44.         itemTypes = type;
  45.         itemRarity = rarity;
  46.         itemValue = value;
  47.         itemFlavorText = flavor;
  48.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement