mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 13:15:42 +12:00
35 lines
777 B
C#
Executable file
35 lines
777 B
C#
Executable file
using HISP.Game.Items;
|
|
using HISP.Util;
|
|
|
|
namespace HISP.Game.Inventory
|
|
{
|
|
public class InventoryItem
|
|
{
|
|
public InventoryItem()
|
|
{
|
|
itemInstances = new ThreadSafeList<ItemInstance>();
|
|
Infinite = false;
|
|
ItemId = 0;
|
|
}
|
|
|
|
public int ItemId;
|
|
public bool Infinite;
|
|
private ThreadSafeList<ItemInstance> itemInstances;
|
|
public void RemoveItem(ItemInstance itm)
|
|
{
|
|
itemInstances.Remove(itm);
|
|
}
|
|
public void AddItem(ItemInstance itm)
|
|
{
|
|
itemInstances.Add(itm);
|
|
}
|
|
public ItemInstance[] ItemInstances
|
|
{
|
|
get
|
|
{
|
|
return itemInstances.ToArray();
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|