void changeInventorySize(int size)
{
dropTheRestItems(size);
if (mainInventory == null)
mainInventory = inventory.GetComponent<Inventory>();
if (size == 3)
{
mainInventory.width = 3;
mainInventory.height = 1;
mainInventory.updateSlotAmount();
mainInventory.adjustInventorySize();
}
if (size == 6)
{
mainInventory.width = 3;
mainInventory.height = 2;
mainInventory.updateSlotAmount();
mainInventory.adjustInventorySize();
}
else if (size == 12)
{
mainInventory.width = 4;
mainInventory.height = 3;
mainInventory.updateSlotAmount();
mainInventory.adjustInventorySize();
}
else if (size == 16)
{
mainInventory.width = 4;
mainInventory.height = 4;
mainInventory.updateSlotAmount();
mainInventory.adjustInventorySize();
}
else if (size == 24)
{
mainInventory.width = 6;
mainInventory.height = 4;
mainInventory.updateSlotAmount();
mainInventory.adjustInventorySize();
}
}