Package com.csse3200.game.areas
Class SprintOneGameArea
java.lang.Object
com.csse3200.game.areas.GameArea
com.csse3200.game.areas.SprintOneGameArea
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
-
Field Summary
Fields inherited from class com.csse3200.game.areas.GameArea
areaEntities, combatStats, inventory, player, terrain
-
Constructor Summary
ConstructorsConstructorDescriptionSprintOneGameArea
(TerrainFactory terrainFactory) Initialise this ForestGameArea to use the provided TerrainFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose of all internal entities in the areaprotected void
Loads assetsprotected void
Load entities.protected void
Load terrain, UI, music.void
void
spawnKey()
protected Entity
Spawns playerprotected Entity
spawnPlayer
(List<Component> componentList) Spawns player with previous componentsMethods inherited from class com.csse3200.game.areas.GameArea
create, createMinimap, createWithPlayer, getComponents, getEvents, getPlayer, reset, saveComponents, spawnEntity, spawnEntityAt, trigger
-
Constructor Details
-
SprintOneGameArea
Initialise this ForestGameArea to use the provided TerrainFactory.- Parameters:
terrainFactory
- TerrainFactory used to create the terrain for the GameArea.- Requires:
- terrainFactory != null
-
-
Method Details
-
loadPrerequisites
protected void loadPrerequisites()Load terrain, UI, music. Must be done before spawning entities. Assets are loaded separately. Entities spawned separately.- Specified by:
loadPrerequisites
in classGameArea
-
loadEntities
protected void loadEntities()Load entities. Terrain must be loaded beforehand. Player must be spawned beforehand if spawning enemies.- Specified by:
loadEntities
in classGameArea
-
spawnKey
public void spawnKey() -
spawnPlayer
Description copied from class:GameArea
Spawns player- Specified by:
spawnPlayer
in classGameArea
- Returns:
- player entity
-
spawnPlayer
Description copied from class:GameArea
Spawns player with previous components- Specified by:
spawnPlayer
in classGameArea
- Parameters:
componentList
-- Returns:
- Player entity with old components
-
spawnDoor
public void spawnDoor() -
loadAssets
protected void loadAssets()Description copied from class:GameArea
Loads assets- Specified by:
loadAssets
in classGameArea
-
dispose
public void dispose()Description copied from class:GameArea
Dispose of all internal entities in the area
-