public void ChoseEffectItem(e_itemType type) { switch (type) { case e_itemType.GLASSES: m_effectType = e_effectType.INVENTORY; break; case e_itemType.COINCHEST: m_effectType = e_effectType.INSTANT; break; case e_itemType.GRENADES: m_effectType = e_effectType.INVENTORY; break; case e_itemType.SHOVEL: m_effectType = e_effectType.INSTANT; break; case e_itemType.PARCHEMENT: m_effectType = e_effectType.INSTANT; break; case e_itemType.STRAIN: m_effectType = e_effectType.INSTANT; break; default: break; } }
public Item(string name, int id, string description, int intensity, e_itemType itemType, e_element elementType) { m_itemName = name; m_itemID = id; m_itemDescription = description; m_intensity = intensity; m_typeItem = itemType; m_itemIcon = AssignResources(itemType); m_elementType = elementType; }
public Item(int id, string name, string description, int intensity, e_itemType type, e_element eltTarget, e_itemRarity rarity, bool isStackable) : this(id, name, description, intensity, type, eltTarget) { LevelRarity = rarity; IsStackable = isStackable; }
public Item(int id, string name, string description, int intensity, e_itemType type, e_element eltTarget) { Id = id; Name = name; Description = description; Intensity = intensity; TypeItem = type; ElementTarget = eltTarget; LevelRarity = e_itemRarity.Normal; IsStackable = false; Sprite = AssignResources(type); }
private Texture2D AssignResources(e_itemType itemType) { Texture2D textureRef = null; switch (itemType) { case e_itemType.INVALID: textureRef = Resources.Load<Texture2D>(m_dictionaryResources[(int)e_itemType.INVALID]); break; case e_itemType.POTION: textureRef = Resources.Load<Texture2D>(m_dictionaryResources[(int)e_itemType.POTION]); break; case e_itemType.FOOD: textureRef = Resources.Load<Texture2D>(m_dictionaryResources[(int)e_itemType.FOOD]); break; default: break; } return textureRef; }
void Add(string itemName, int itemId, string itemDes, e_itemType itemType) { //tmp.InitSetting(itemName, itemId, itemType, itemDes, Resources.Load<Sprite>("ItemImage/" + itemName)); //itemList.Add(tmp); }
public static Sprite AssignResources(e_itemType itemType) { Sprite textureRef = null; switch (itemType) { case e_itemType.NONE: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.NONE]); break; case e_itemType.POTION: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.POTION]); break; case e_itemType.FOOD: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.FOOD]); break; case e_itemType.POTION_EVOLVE: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.POTION_EVOLVE]); break; case e_itemType.POTION_POISON: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.POTION_POISON]); break; case e_itemType.BISCUIT: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.BISCUIT]); break; case e_itemType.CERISE: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.CERISE]); break; case e_itemType.BLUE: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.BLUE]); break; case e_itemType.ORANGE: textureRef = Resources.Load<Sprite>(m_dictionaryResources[(int)e_itemType.ORANGE]); break; default: break; } return textureRef; }