Package view.entities

Class HurryUpManagerView

java.lang.Object
view.entities.HurryUpManagerView
All Implemented Interfaces:
Observer

public class HurryUpManagerView extends Object implements 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 Type
    Method
    Description
    void
    Checks if the "Hurry Up" sound should be played.
    void
    Draws the "Hurry Up" image and the SkelMonsta view on the screen.
    Returns the singleton instance of HurryUpManagerView.
    void
    Resets the state of the "Hurry Up" image and the SkelMonsta view for a new level.
    void
    Resets the state of the "Hurry Up" image and the SkelMonsta view for a new play session.
    void
    Restarts the state of the "Hurry Up" image and the SkelMonsta view.
    void
    Updates the state of the "Hurry Up" image and the SkelMonsta view.
    void
    Updates the view based on changes in the observed model.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static HurryUpManagerView 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

      public void draw(Graphics g)
      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

      public void update(Observable o, Object arg)
      Updates the view based on changes in the observed model.
      Specified by:
      update in interface Observer
      Parameters:
      o - the observable object
      arg - an argument passed to the notifyObservers method