Class WallFactory

java.lang.Object
com.csse3200.game.entities.factories.WallFactory

public class WallFactory extends Object
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 Details

    • WallFactory

      public WallFactory()
  • Method Details

    • createWall

      public 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). Texture is scaled to fit the specified size.
      Parameters:
      x - World X (bottom-left)
      y - World Y (bottom-left)
      width - Wall width in world units
      height - Wall height in world units
      texturePath - Asset path, e.g. "images/walls/stone_wall.png"
      Returns:
      Configured wall entity
    • createTiledWall

      public static Entity createTiledWall(float x, float y, int tilesX, int tilesY, float tileWorldSize, String texturePath)