Class MazeTerrainFactory

java.lang.Object
com.csse3200.game.areas.terrain.TerrainFactory
com.csse3200.game.minigames.maze.areas.terrain.MazeTerrainFactory

public class MazeTerrainFactory extends TerrainFactory
Factory for creating game terrain for the maze mini-game.
  • Field Details

    • MAP_SIZE

      public static final com.badlogic.gdx.math.GridPoint2 MAP_SIZE
    • TILE_SIZE

      public static final float TILE_SIZE
      See Also:
  • Constructor Details

    • MazeTerrainFactory

      public MazeTerrainFactory(CameraComponent cameraComponent)
      Create a terrain factory with Orthogonal orientation
      Parameters:
      cameraComponent - Camera to render terrains to. Must be ortographic.
  • Method Details

    • createTerrain

      public TerrainComponent createTerrain()
      Create terrain for the maze mini-game. There is only one Terrain type, the maze background water.
      Returns:
      Terrain component which renders the terrain
    • worldPosToGridPos

      public static com.badlogic.gdx.math.GridPoint2 worldPosToGridPos(com.badlogic.gdx.math.Vector2 worldPos)
      Gets the maze grid cell containing the given point in world coordinates.
      Parameters:
      worldPos - vector to represent a position in the world
      Returns:
      the coordinate of the grid cell this point is contained in