private void DeleteBuildingBlocks() { foreach (var block in FindObjectsOfType <BuildingBlock>()) { switch (block.BlockType) { case BuildingBlockType.Default: buildingPlacement.DeleteFloor(block.gameObject); break; case BuildingBlockType.Elevator: buildingPlacement.DeleteElevator(block.gameObject); break; default: break; } } }