mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2025-10-30 12:57:08 +01:00
kp
This commit is contained in:
@@ -14,6 +14,7 @@ public class Slot
|
||||
/// [Methods]
|
||||
/// void addItem(int count = 1)
|
||||
/// void removeItem(int count = 1)
|
||||
/// void clear()
|
||||
/// </summary>
|
||||
|
||||
Item item;
|
||||
@@ -36,5 +37,18 @@ public class Slot
|
||||
{
|
||||
// removes any number of items from the slot will also go negative
|
||||
this.count -= count;
|
||||
}
|
||||
}
|
||||
public void clear()
|
||||
{
|
||||
item = null;
|
||||
count = 0;
|
||||
}
|
||||
public Slot copy()
|
||||
{
|
||||
Slot slot = new Slot(maxItems);
|
||||
slot.count = count;
|
||||
slot.ItemType = ItemType;
|
||||
|
||||
return slot;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user