Package com.csse3200.game.areas.terrain
Class CombatTerrainFactory
java.lang.Object
com.csse3200.game.areas.terrain.CombatTerrainFactory
Factory for creating game terrains.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
This enum should contain the different terrains in your game, e.g. -
Constructor Summary
ConstructorsConstructorDescriptionCombatTerrainFactory
(CameraComponent cameraComponent) Create a terrain factory with Orthogonal orientationCombatTerrainFactory
(CameraComponent cameraComponent, TerrainOrientation orientation) Create a terrain factory -
Method Summary
Modifier and TypeMethodDescriptioncreateBackgroundTerrainAir
(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize) createBackgroundTerrainLand
(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize) createBackgroundTerrainWater
(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize) Retrieve the component to which the camera is attached
-
Constructor Details
-
CombatTerrainFactory
Create a terrain factory with Orthogonal orientation- Parameters:
cameraComponent
- Camera to render terrains to. Must be ortographic.
-
CombatTerrainFactory
Create a terrain factory- Parameters:
cameraComponent
- Camera to render terrains to. Must be orthographic.orientation
- orientation to render terrain at
-
-
Method Details
-
getCameraComponent
Retrieve the component to which the camera is attached- Returns:
- the camera component
-
createBackgroundTerrainAir
public TerrainComponent createBackgroundTerrainAir(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize) -
createBackgroundTerrainLand
public TerrainComponent createBackgroundTerrainLand(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize) -
createBackgroundTerrainWater
public TerrainComponent createBackgroundTerrainWater(CombatTerrainFactory.TerrainType terrainType, com.badlogic.gdx.math.GridPoint2 playerPosition, com.badlogic.gdx.math.GridPoint2 screenSize)
-