This commit is contained in:
j.mei7
2022-02-21 19:02:23 +01:00
parent a62bb1ae73
commit 1e092487a9
2 changed files with 34 additions and 19 deletions

View File

@@ -18,15 +18,12 @@ public class Slot
/// </summary>
Item item;
int maxItems = 1;
int count = 0;
public Item ItemType { get => item; set => item = value; }
public int Count { get => count; set => count = value; }
public int MaxItems { get => maxItems; set => maxItems = value; }
public Slot(int maxItems = 1)
public Slot()
{
item = null;
this.maxItems = maxItems;
}
public void addItem(int count = 1)
{
@@ -45,7 +42,7 @@ public class Slot
}
public Slot copy()
{
Slot slot = new Slot(maxItems);
Slot slot = new Slot();
slot.count = count;
slot.ItemType = ItemType;