Class WallFactory
java.lang.Object
com.csse3200.game.entities.factories.WallFactory
Factory for creating static vertical wall entities.
Walls:
- Are static (do not move)
- Block movement
- Are not considered "ground" (player shouldn't stand on them)
- Use distinct textures from platforms
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createTiledWall
(float x, float y, int tilesX, int tilesY, float tileWorldSize, String texturePath) static Entity
createWall
(float x, float y, float width, float height, String texturePath) Create a vertical wall at world position (x, y) with given size (width, height).
-
Constructor Details
-
WallFactory
public WallFactory()
-
-
Method Details
-
createWall
Create a vertical wall at world position (x, y) with given size (width, height). Texture is scaled to fit the specified size.- Parameters:
x
- World X (bottom-left)y
- World Y (bottom-left)width
- Wall width in world unitsheight
- Wall height in world unitstexturePath
- Asset path, e.g. "images/walls/stone_wall.png"- Returns:
- Configured wall entity
-
createTiledWall
-