Class AtlantisTerrainFactory

java.lang.Object
com.deco2800.game.areas.terrain.AtlantisTerrainFactory

public class AtlantisTerrainFactory extends Object
Factory for creating game terrain.
  • Field Details

  • Constructor Details

    • AtlantisTerrainFactory

      public AtlantisTerrainFactory(CameraComponent cameraComponent)
      Create a terrain factory with Isometric orientation
      Parameters:
      cameraComponent - Camera to render terrain to. Must be orthographic.
  • Method Details

    • createAtlantisTerrainComponent

      public TerrainComponent 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

      public static MapGenerator 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

      public CameraComponent getCameraComponent()
      Getter for the CameraComponent of this class
      Returns:
      MapGenerator object
    • getMapGenerator

      public MapGenerator getMapGenerator()
      Getter for the MapGenerator of this class
      Returns:
      CameraComponent object