Added remove method

Added add slot method
Added comments
This commit is contained in:
julius
2022-02-12 12:14:40 +01:00
parent 9201677c1b
commit f0a5fe201c
3 changed files with 85 additions and 75 deletions

View File

@@ -15,21 +15,10 @@ public class Slot
count = 0;
}
public bool removeItem()
public bool removeItem(int count = 1)
{
if (count > 0)
{
count--;
if (count == 0)
{
item = null;
}
return true;
}
else
{
return false;
}
this.count -= count;
return true;
}
public bool addItem(int count = 1)
{