public Itemsc(string name, int cost, int ability, eItemType itemtype, BuyItemType buytype) { Name = name; ItemCost = cost; ItemAbility = ability; ItemType = itemtype; BuyType = buytype; }
public void CreateShopItem(string str, int index, BuyItemType item) { var inst = Instantiate(ItemPrefab); // HP Potion Value; string Itemtext = str; ItemListScript itemIndex = inst.GetComponent <ItemListScript>(); itemIndex.SetImage(m_ItemSprite[index], Itemtext, item); inst.transform.SetParent(ShopCanvas.content); ItemObjList.Add(inst); }
public override void WriteXml(XmlWriter writer) { writer.WriteAttributeString("NpcEntry", NpcEntry.ToString()); writer.WriteAttributeString("X", loc.X.ToString()); writer.WriteAttributeString("Y", loc.Y.ToString()); writer.WriteAttributeString("Z", loc.Z.ToString()); writer.WriteAttributeString("ItemID", ItemID); writer.WriteAttributeString("Count", Count.ToString()); writer.WriteAttributeString("BuyItemType", BuyItemType.ToString()); writer.WriteAttributeString("BuyAdditively", BuyAdditively.ToString()); }
public void SetImage(Sprite sp, string str, BuyItemType item) { ItemImage.sprite = sp; text.text = str; Type = item; }