Class HurryUpManagerModel

java.lang.Object
java.util.Observable
model.entities.HurryUpManagerModel

public class HurryUpManagerModel extends Observable
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 Details

    • getInstance

      public static HurryUpManagerModel getInstance()
      Returns the singleton instance of the HurryUpManagerModel.
      Returns:
      the singleton instance
    • update

      public void update(PlayerModel playerModel)
      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

      public EnemyModel getSkelMonstaModel()
      Returns the SkelMonsta model.
      Returns:
      the SkelMonsta model