public static void LShape(int _roomLength, int _roomHeight, int _directionIndex) { Square(); for (int i = 0; i < _roomLength + 1; ++i) { for (int a = 0; a < _roomHeight; ++a) { switch (_directionIndex) { case 0: //Right Vector2Int pos = ShapeDirectionVector(_roomLength + i + 1, 0 + a); AddToFloorTilePositions(pos); break; case 1: //Left Vector2Int pos2 = ShapeDirectionVector(0 - i, 0 + a); AddToFloorTilePositions(pos2); break; case 2: //UpRight Vector2Int pos3 = ShapeDirectionVector(WallGen.GetWallDimensions().x + 1 + i, WallGen.GetWallDimensions().y - _roomHeight + a); AddToFloorTilePositions(pos3); break; case 3: //UpLeft Vector2Int pos4 = ShapeDirectionVector(0 - i, WallGen.GetWallDimensions().y - _roomHeight + a); AddToFloorTilePositions(pos4); break; } } } }
public static void Square() { for (int i = 0; i < WallGen.GetWallDimensions().x + 1; ++i) { for (int a = 0; a < WallGen.GetWallDimensions().y; ++a) { Vector2Int pos = new Vector2Int(DungeonUtility.GetBuildPoint().x + i, DungeonUtility.GetBuildPoint().y + a); AddToFloorTilePositions(pos); } } }