Package com.csse3200.game.ui.cutscene
Class CutsceneArea
java.lang.Object
com.csse3200.game.areas.GameArea
com.csse3200.game.ui.cutscene.CutsceneArea
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Special game area that can be used to display a cutscene. Works as a game level, so can be
transitioned into from another.
-
Field Summary
Fields inherited from class com.csse3200.game.areas.GameArea
areaEntities, combatStats, deathLocations, grid, inventory, isResetting, player, tileBounds -
Constructor Summary
ConstructorsConstructorDescriptionCutsceneArea(String scriptPath) Constructor for creating the game area representing cutscene. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Correctly unregisters the player, any assets loaded, and entities created for the cutsceneprotected voidPrivate method for loading all assets into the resource service.protected voidCreates a reader entity with parses a script file, then an entity for displaying/handling UI.protected voidThere are no pre-reqs for cutscene areasvoidreset()Cutscene areas cannot be resetprotected EntityCreate dummy player for cutsceneprotected EntityspawnPlayer(List<Component> componentList) Create dummy player for cutsceneMethods inherited from class com.csse3200.game.areas.GameArea
create, createMinimap, createWithPlayer, getComponents, getDeathLocations, getEvents, getMapBounds, getPlayer, recordDeathLocation, saveComponents, setDeathMarkerTexture, spawnDeathMarker, spawnDeathMarkers, spawnEntity, spawnEntityAt, trigger
-
Constructor Details
-
CutsceneArea
Constructor for creating the game area representing cutscene.- Parameters:
scriptPath- The file path to the cutscene script to be given to the reader component
-
-
Method Details
-
loadPrerequisites
protected void loadPrerequisites()There are no pre-reqs for cutscene areas- Specified by:
loadPrerequisitesin classGameArea
-
loadEntities
protected void loadEntities()Creates a reader entity with parses a script file, then an entity for displaying/handling UI. Additionally, this method creates a dummy player (requirement of GameArea)- Specified by:
loadEntitiesin classGameArea
-
loadAssets
protected void loadAssets()Private method for loading all assets into the resource service. This includes dummy assets for the minimap and player, as well as backgrounds for the cutscene- Specified by:
loadAssetsin classGameArea
-
reset
public void reset()Cutscene areas cannot be reset -
spawnPlayer
Create dummy player for cutscene- Specified by:
spawnPlayerin classGameArea- Returns:
- player entity
-
spawnPlayer
Create dummy player for cutscene- Specified by:
spawnPlayerin classGameArea- Parameters:
componentList- the list of components with witch to create the player- Returns:
- Player entity with old components
-
dispose
public void dispose()Correctly unregisters the player, any assets loaded, and entities created for the cutscene
-