void OnInventoryChanged()
        {
            Dictionary.Clear();

            for (int i = 0; i < Inventory.Items.Count; i++)
            {
                if (Items.Upgrades.IsUpgradable(Inventory.Items[i].Template.CatalogItem))
                {
                    var data = new ItemUpgradesData(Inventory.Items[i]);

                    if (Dictionary.ContainsKey(Inventory.Items[i].Template))
                    {
                        Debug.LogWarning("Duplicate Unit found, duplicate: " + Inventory.Items[i].Template);
                        continue;
                    }

                    Dictionary.Add(Inventory.Items[i].Template, data);
                }
            }
        }
Ejemplo n.º 2
0
 public virtual void Init()
 {
     Upgrades = new ItemUpgradesData(template, rank);
 }
Ejemplo n.º 3
0
 public virtual void Set(ItemUpgradesData data)
 {
     this.Data = data;
 }