Package com.csse3200.game.areas.combat
Class CombatArea
java.lang.Object
com.csse3200.game.areas.GameArea
com.csse3200.game.areas.combat.CombatArea
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Forest area for the demo game with trees, a player, and some enemies.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
FieldsFields inherited from class com.csse3200.game.areas.GameArea
areaEntities, terrain
-
Constructor Summary
ConstructorsConstructorDescriptionCombatArea
(Entity player, Entity enemy, GdxGame game, CombatTerrainFactory terrainFactory) Initialise this ForestGameArea to use the provided CombatTerrainFactory and the enemy which player has engaged combat with. -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Create the game area, including terrain, static entities (trees), dynamic entities (player)void
dispose()
Dispose of all internal entities in the areavoid
Pause the music for combat.void
Play the music for combatvoid
Spawns the official backgrond terrain for combat using combat terrain factoryvoid
startEnemyAnimation
(CombatArea.CombatAnimation animation) Plays an enemy animation in combatvoid
startPlayerAnimation
(CombatArea.CombatAnimation animation) Plays a player animation in combatvoid
Methods inherited from class com.csse3200.game.areas.GameArea
spawnConvertedNPCs, spawnEntity, spawnEntityAt, spawnEntityAtVector, spawnEntityCenteredAt, unlockArea
-
Field Details
-
kingdomType
-
-
Constructor Details
-
CombatArea
Initialise this ForestGameArea to use the provided CombatTerrainFactory and the enemy which player has engaged combat with.- Parameters:
terrainFactory
- CombatTerrainFactory used to create the terrain for the GameArea.- Requires:
- terrainFactory != null
-
-
Method Details
-
create
public void create()Create the game area, including terrain, static entities (trees), dynamic entities (player) -
spawnTerrain
public void spawnTerrain()Spawns the official backgrond terrain for combat using combat terrain factory -
startEnemyAnimation
Plays an enemy animation in combat- Parameters:
animation
- CombatAnimation (IDLE or MOVE) to trigger
-
startPlayerAnimation
Plays a player animation in combat- Parameters:
animation
- CombatAnimation (IDLE or MOVE) to trigger
-
playMusic
public void playMusic()Play the music for combat -
pauseMusic
public void pauseMusic()Pause the music for combat. Will be finalised and used when combat pause is implemented- Specified by:
pauseMusic
in classGameArea
-
unloadAssets
public void unloadAssets()- Specified by:
unloadAssets
in classGameArea
-
dispose
public void dispose()Description copied from class:GameArea
Dispose of all internal entities in the area -
getPlayer
-
getEnemies
- Specified by:
getEnemies
in classGameArea
-
getBosses
-
getFriendlyNPCs
- Specified by:
getFriendlyNPCs
in classGameArea
-
getMinigameNPCs
- Specified by:
getMinigameNPCs
in classGameArea
-