Package model.entities
Class HurryUpManagerModel
java.lang.Object
java.util.Observable
model.entities.HurryUpManagerModel
Manages the "Hurry Up" state in the game.
This singleton class handles the timing and activation of the "Hurry Up" state, which includes activating the SkelMonsta enemy and notifying observers of state changes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic HurryUpManagerModelReturns the singleton instance of the HurryUpManagerModel.Returns the SkelMonsta model.booleanReturns whether the "Hurry Up" state is active.voidResets the "Hurry Up" state and SkelMonsta for a new level.voidResets the "Hurry Up" state and SkelMonsta for a new level.voidrestart()Restarts the "Hurry Up" state and resets the SkelMonsta.voidActivates SkelMonsta and sets all enemies to hungry state.voidupdate(PlayerModel playerModel) Updates the state of the HurryUpManagerModel.voidUpdates the timers for the "Hurry Up" state and SkelMonsta activation.Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Method Details
-
getInstance
Returns the singleton instance of the HurryUpManagerModel.- Returns:
- the singleton instance
-
update
Updates the state of the HurryUpManagerModel.- Parameters:
playerModel- the player model used to update the SkelMonsta
-
updateTimer
public void updateTimer()Updates the timers for the "Hurry Up" state and SkelMonsta activation. -
restart
public void restart()Restarts the "Hurry Up" state and resets the SkelMonsta. -
newLevelReset
public void newLevelReset()Resets the "Hurry Up" state and SkelMonsta for a new level. -
newPlayReset
public void newPlayReset()Resets the "Hurry Up" state and SkelMonsta for a new level. -
startSkelMostaAction
public void startSkelMostaAction()Activates SkelMonsta and sets all enemies to hungry state. -
isHurryUpActive
public boolean isHurryUpActive()Returns whether the "Hurry Up" state is active.- Returns:
- true if the "Hurry Up" state is active, false otherwise
-
getSkelMonstaModel
Returns the SkelMonsta model.- Returns:
- the SkelMonsta model
-