unc.cdva.renderingengine.gui
Class FengGUIEventRouter

java.lang.Object
  extended by unc.cdva.events.SingleEventSource<GameEventListener>
      extended by unc.cdva.renderingengine.gui.FengGUIEventRouter

public class FengGUIEventRouter
extends SingleEventSource<GameEventListener>

Utility class that is used by the UI manager to notify some GameEventListeners (GameEngine!)

Author:
Guillaume Conte

Field Summary
 
Fields inherited from class unc.cdva.events.SingleEventSource
listeners
 
Constructor Summary
FengGUIEventRouter()
          Create a FengGUIEventRouter
 
Method Summary
 void notifyAddProblem(Id problemId, float x, float y)
          Notify the listeners that a problem is being added with an id and a position on screen
 void notifyCancelProblem(Id problemId)
          Notify the listeners that a problem is being cancelled
 void notifyFire(Id problemId)
          Notify the listeners that a gun is firing with the data of a problem
 void notifyFreeze()
          Notify the listeners that the game is pausing
 void notifyLoadMainMenu()
          Notify the listeners that the main menu is loading
 void notifyLoadNextLevel()
          Notify the listeners that the next level is loading
 void notifyLoadOptionMenu()
          Notify the listeners that the option menu is loading
 void notifyLoadSinglePlayer()
          Notify the listeners that a single player game is loading
 void notifyQuit()
          Notify the listeners that the game is quitting
 void notifySetMasterVolume(float masterVolume)
          Notify the listeners that the master volume is being set
 void notifySetMusicFolder(java.lang.String musicFolder)
          Notify the listeners that the music folder is being set
 void notifySetProblemValue(Id problemId, long value)
          Notify the listeners that a problem value is being set
 void notifySetVideoResolution(java.awt.Dimension dimension)
          Notify the listeners that the video resolution is being set
 void notifyUnfreezeGame()
          Notify the listeners that the game is resuming
 
Methods inherited from class unc.cdva.events.SingleEventSource
addListener, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FengGUIEventRouter

public FengGUIEventRouter()
Create a FengGUIEventRouter

Method Detail

notifyLoadSinglePlayer

public void notifyLoadSinglePlayer()
Notify the listeners that a single player game is loading


notifyLoadMainMenu

public void notifyLoadMainMenu()
Notify the listeners that the main menu is loading


notifyLoadOptionMenu

public void notifyLoadOptionMenu()
Notify the listeners that the option menu is loading


notifyLoadNextLevel

public void notifyLoadNextLevel()
Notify the listeners that the next level is loading


notifyAddProblem

public void notifyAddProblem(Id problemId,
                             float x,
                             float y)
Notify the listeners that a problem is being added with an id and a position on screen

Parameters:
problemId - id of the problem
x - x coordinate of the problem
y - y coordinate of the problem

notifyCancelProblem

public void notifyCancelProblem(Id problemId)
Notify the listeners that a problem is being cancelled

Parameters:
problemId - id of the problem

notifySetProblemValue

public void notifySetProblemValue(Id problemId,
                                  long value)
Notify the listeners that a problem value is being set

Parameters:
problemId - id of the problem
value - user value

notifyFire

public void notifyFire(Id problemId)
Notify the listeners that a gun is firing with the data of a problem

Parameters:
problemId - id of the problem

notifyQuit

public void notifyQuit()
Notify the listeners that the game is quitting


notifySetVideoResolution

public void notifySetVideoResolution(java.awt.Dimension dimension)
Notify the listeners that the video resolution is being set

Parameters:
dimension - new resolution of the game screen

notifySetMusicFolder

public void notifySetMusicFolder(java.lang.String musicFolder)
Notify the listeners that the music folder is being set

Parameters:
musicFolder - path of the music folder

notifySetMasterVolume

public void notifySetMasterVolume(float masterVolume)
Notify the listeners that the master volume is being set

Parameters:
masterVolume - value of the master volume

notifyFreeze

public void notifyFreeze()
Notify the listeners that the game is pausing


notifyUnfreezeGame

public void notifyUnfreezeGame()
Notify the listeners that the game is resuming