Class ItemManagerView

java.lang.Object
view.itemsAndRewards.ItemManagerView

public class ItemManagerView extends Object
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 Details

    • getInstance

      public static ItemManagerView 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

      public void draw(Graphics g)
      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

      public BufferedImage[] getBubbleRewardImages()
      Returns the sprite images for bubble rewards.
      Returns:
      an array of BufferedImage objects representing bubble reward images
    • getPowerUpImages

      public BufferedImage[] getPowerUpImages()
      Returns the sprite images for power-ups.
      Returns:
      an array of BufferedImage objects representing power-up images
    • getDeSpawnImages

      public BufferedImage[] getDeSpawnImages()
      Returns the sprite images for de-spawning items.
      Returns:
      an array of BufferedImage objects representing de-spawn images