This commit is contained in:
Nim XD
2024-08-27 21:01:33 +05:30
parent 99eaf514fd
commit 121a1b7c73
31803 changed files with 623461 additions and 623399 deletions

View File

@@ -1,30 +1,30 @@
using System.Collections.Generic;
using Assets.HeroEditor4D.InventorySystem.Scripts.Data;
using UnityEngine;
namespace Assets.HeroEditor4D.InventorySystem.Scripts.Elements
{
/// <summary>
/// Abstract item container. It can be inventory bag, player equipment or trader goods.
/// </summary>
public abstract class ItemContainer : MonoBehaviour
{
/// <summary>
/// List of items.
/// </summary>
public List<Item> Items { get; protected set; } = new List<Item>();
[Header("Settings")]
[Tooltip("Stack identical inventory items to a single UI element.")]
public bool Stacked = true;
public bool AutoSelect = true;
public abstract void Refresh(Item selected);
public void Initialize(ref List<Item> items, Item selected = null)
{
Items = items;
Refresh(selected);
}
}
using System.Collections.Generic;
using Assets.HeroEditor4D.InventorySystem.Scripts.Data;
using UnityEngine;
namespace Assets.HeroEditor4D.InventorySystem.Scripts.Elements
{
/// <summary>
/// Abstract item container. It can be inventory bag, player equipment or trader goods.
/// </summary>
public abstract class ItemContainer : MonoBehaviour
{
/// <summary>
/// List of items.
/// </summary>
public List<Item> Items { get; protected set; } = new List<Item>();
[Header("Settings")]
[Tooltip("Stack identical inventory items to a single UI element.")]
public bool Stacked = true;
public bool AutoSelect = true;
public abstract void Refresh(Item selected);
public void Initialize(ref List<Item> items, Item selected = null)
{
Items = items;
Refresh(selected);
}
}
}