Package view.entities
Class HurryUpManagerView
java.lang.Object
view.entities.HurryUpManagerView
- All Implemented Interfaces:
Observer
The HurryUpManagerView class manages the view for the HurryUp state in the game.
It handles updating and drawing the "Hurry Up" image and the SkelMonsta enemy.
-
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if the "Hurry Up" sound should be played.voidDraws the "Hurry Up" image and the SkelMonsta view on the screen.static HurryUpManagerViewReturns the singleton instance of HurryUpManagerView.voidResets the state of the "Hurry Up" image and the SkelMonsta view for a new level.voidResets the state of the "Hurry Up" image and the SkelMonsta view for a new play session.voidrestart()Restarts the state of the "Hurry Up" image and the SkelMonsta view.voidupdate()Updates the state of the "Hurry Up" image and the SkelMonsta view.voidupdate(Observable o, Object arg) Updates the view based on changes in the observed model.
-
Method Details
-
getInstance
Returns the singleton instance of HurryUpManagerView.- Returns:
- the singleton instance of HurryUpManagerView
-
update
public void update()Updates the state of the "Hurry Up" image and the SkelMonsta view. -
draw
Draws the "Hurry Up" image and the SkelMonsta view on the screen.- Parameters:
g- the Graphics object to draw with
-
checkPlaySound
public void checkPlaySound()Checks if the "Hurry Up" sound should be played. -
restart
public void restart()Restarts the state of the "Hurry Up" image and the SkelMonsta view. -
newLevelReset
public void newLevelReset()Resets the state of the "Hurry Up" image and the SkelMonsta view for a new level. -
newPlayReset
public void newPlayReset()Resets the state of the "Hurry Up" image and the SkelMonsta view for a new play session. -
update
Updates the view based on changes in the observed model.
-