void SelectTool(bool select) { toolsDisplay.GetChild(selectedToolSlot).GetComponent <Image>().color = select? toolDisplayColor: new Color(0, 0, 0, 0); Vector2Int item = inv.GetTool(selectedToolSlot); if (item.y == 0) { toolManager.deselectTool(); return; } if (select) { toolManager.selectTool(item.x); } else { toolManager.deselectTool(); } }