Package com.deco2800.game.areas.terrain
Class AtlantisTerrainFactory
java.lang.Object
com.deco2800.game.areas.terrain.AtlantisTerrainFactory
Factory for creating game terrain.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAtlantisTerrainFactory
(CameraComponent cameraComponent) Create a terrain factory with Isometric orientation -
Method Summary
Modifier and TypeMethodDescriptionvoid
Updates the structure and rendering to show flashing tiles before flooding.void
Updates the structure and rendering to show flooding.Getter for the CameraComponent of this classGetter for the MapGenerator of this classstatic MapGenerator
Returns a new MapGenerator with identical parameters as the one created for the game - used in testing the consistency of the MapGeneratorcom.badlogic.gdx.math.GridPoint2
randomlySelectTileToMoveTo
(com.badlogic.gdx.math.GridPoint2 startPos) Randomly selects a tile for a unit to roam to.
-
Field Details
-
MAP_TILE_SCALE
public static final float MAP_TILE_SCALE- See Also:
-
-
Constructor Details
-
AtlantisTerrainFactory
Create a terrain factory with Isometric orientation- Parameters:
cameraComponent
- Camera to render terrain to. Must be orthographic.
-
-
Method Details
-
createAtlantisTerrainComponent
-
randomlySelectTileToMoveTo
public com.badlogic.gdx.math.GridPoint2 randomlySelectTileToMoveTo(com.badlogic.gdx.math.GridPoint2 startPos) Randomly selects a tile for a unit to roam to.- Parameters:
startPos
- Starting position, bounding the exploration.- Returns:
- A GridPoint2 coordinate to move to.
-
floodTiles
public void floodTiles()Updates the structure and rendering to show flooding. -
flashTiles
public void flashTiles()Updates the structure and rendering to show flashing tiles before flooding. -
makeMapGenerator
Returns a new MapGenerator with identical parameters as the one created for the game - used in testing the consistency of the MapGenerator- Returns:
- new MapGenerator with correct parameters
-
getCameraComponent
Getter for the CameraComponent of this class- Returns:
- MapGenerator object
-
getMapGenerator
Getter for the MapGenerator of this class- Returns:
- CameraComponent object
-