Package view.itemsAndRewards
Class ItemManagerView
java.lang.Object
view.itemsAndRewards.ItemManagerView
The ItemManagerView class manages the rendering of item views in the game.
It handles loading the sprites for the items, synchronizing the view with the model, and drawing the items on the screen.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDraws all active item views on the screen.Returns the sprite images for bubble rewards.Returns the sprite images for de-spawning items.static ItemManagerViewReturns the singleton instance of ItemManagerView, creating it if necessary.Returns the sprite images for power-ups.voidResets the item views for a new level.voidResets the item views for a new play session.voidupdate()Updates the state of the item views.
-
Method Details
-
getInstance
Returns the singleton instance of ItemManagerView, creating it if necessary.- Returns:
- the singleton instance of ItemManagerView
-
update
public void update()Updates the state of the item views. -
draw
Draws all active item views on the screen.- Parameters:
g- the Graphics object to draw with
-
newLevelReset
public void newLevelReset()Resets the item views for a new level. -
newPlayReset
public void newPlayReset()Resets the item views for a new play session. -
getBubbleRewardImages
Returns the sprite images for bubble rewards.- Returns:
- an array of BufferedImage objects representing bubble reward images
-
getPowerUpImages
Returns the sprite images for power-ups.- Returns:
- an array of BufferedImage objects representing power-up images
-
getDeSpawnImages
Returns the sprite images for de-spawning items.- Returns:
- an array of BufferedImage objects representing de-spawn images
-