void DrawSlot() { for (int x = 0; x < profile.width; x++) { for (int y = 0; y < profile.height; y++) { if (teleportID != -Vector2.right) { if (DrawSlotButtonTeleport(x, y, rect, profile)) { if (x == teleportID.x && y == teleportID.y) { profile.SetTeleport(Mathf.CeilToInt(teleportID.x), Mathf.CeilToInt(teleportID.y), 0); } else { profile.SetTeleport(Mathf.CeilToInt(teleportID.x), Mathf.CeilToInt(teleportID.y), y * 12 + x + 1); } teleportID = -Vector2.right; } continue; } if (DrawSlotButton(x, y, rect, profile)) { switch (toolID) { case "Slots": profile.SetSlot(x, y, !profile.GetSlot(x, y)); break; case "Generators": profile.SetGenerator(x, y, !profile.GetGenerator(x, y)); break; case "Teleports": teleportID = new Vector2(x, y); break; case "Sugar Drop": profile.SetSugarDrop(x, y, !profile.GetSugarDrop(x, y)); break; } } } } DrawWallPreview(rect, profile); }