Package view.itemsAndRewards
Class RewardPointsManagerView
java.lang.Object
view.itemsAndRewards.RewardPointsManagerView
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 Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g) Draws all active points on the screen.getBigPointsImage(int value) Returns the sprite image for big points based on the value.static RewardPointsManagerViewReturns the singleton instance of RewardPointsManagerView, creating it if necessary.getSmallPointsImage(int value) Returns the sprite image for small points based on the value.voidResets the points view array for a new level.voidResets the points view array for a new play session.
-
Method Details
-
getInstance
Returns the singleton instance of RewardPointsManagerView, creating it if necessary.- Returns:
- the singleton instance of RewardPointsManagerView
-
draw
Draws all active points on the screen.- Parameters:
g- the Graphics2D object to draw with
-
getSmallPointsImage
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
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.
-