Class RewardPointsManagerView

java.lang.Object
view.itemsAndRewards.RewardPointsManagerView

public class RewardPointsManagerView extends Object
The RewardPointsManagerView class manages the rendering of reward points in the game. It handles loading the sprites for the points, synchronizing the view with the model, and drawing the points on the screen.
  • Method Details

    • getInstance

      public static RewardPointsManagerView getInstance()
      Returns the singleton instance of RewardPointsManagerView, creating it if necessary.
      Returns:
      the singleton instance of RewardPointsManagerView
    • draw

      public void draw(Graphics2D g)
      Draws all active points on the screen.
      Parameters:
      g - the Graphics2D object to draw with
    • getSmallPointsImage

      public BufferedImage getSmallPointsImage(int value)
      Returns the sprite image for small points based on the value.
      Parameters:
      value - the value of the points
      Returns:
      the BufferedImage for the small points
    • getBigPointsImage

      public BufferedImage getBigPointsImage(int value)
      Returns the sprite image for big points based on the value.
      Parameters:
      value - the value of the points
      Returns:
      the BufferedImage for the big points
    • newPlayReset

      public void newPlayReset()
      Resets the points view array for a new play session.
    • newLevelReset

      public void newLevelReset()
      Resets the points view array for a new level.