Package view.entities
Class EnemyManagerView
java.lang.Object
view.entities.EnemyManagerView
The EnemyManagerView class manages the view for all enemy entities in the game.
It handles loading enemy sprites, updating enemy views, and drawing enemies on the screen.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDraws all active enemy views on the screen.BufferedImage[][]getEnemySprite(Constants.EnemyConstants.EnemyType enemyType) Returns the sprite array for the specified enemy type.static EnemyManagerViewReturns the singleton instance of EnemyManagerView.voidResets the enemy views for a new level.voidResets the enemy views for a new play session.voidupdate()Updates all active enemy views.
-
Method Details
-
getInstance
Returns the singleton instance of EnemyManagerView.- Returns:
- the singleton instance of EnemyManagerView
-
update
public void update()Updates all active enemy views. -
draw
Draws all active enemy views on the screen.- Parameters:
g- the Graphics object to draw with
-
newLevelReset
public void newLevelReset()Resets the enemy views for a new level. -
newPlayReset
public void newPlayReset()Resets the enemy views for a new play session. -
getEnemySprite
Returns the sprite array for the specified enemy type.- Parameters:
enemyType- the type of the enemy- Returns:
- the sprite array for the specified enemy type
-