using Kryz.CharacterStats.Examples; using System; using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; [System.Serializable] public class ItemInstance { public string ItemName; [SerializeField] public Sprite Icon; public int sellPricePlayer; public int sellPriceVendor; public string description; public int templateIndex; public ItemInstance() { ItemName = ""; Icon = null; sellPricePlayer = 0; sellPriceVendor = 0; description = ""; templateIndex = 0; } public ItemInstance(Item template) { ItemName = template.ItemName; templateIndex = ItemIndexer.Instance.Items.IndexOf(template); Icon = template.Icon; sellPricePlayer = template.sellPricePlayer; sellPriceVendor = template.sellPriceVendor; description = template.description; } public ItemInstance(Item template, int templateIndex) { ItemName = template.ItemName; this.templateIndex = templateIndex; Icon = template.Icon; sellPricePlayer = template.sellPricePlayer; sellPriceVendor = template.sellPriceVendor; description = template.description; } }