|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.engine.state.GameState
vooga.engine.state.other.Menu
public class Menu
Field Summary |
---|
Fields inherited from class vooga.engine.state.GameState |
---|
myRenderField, myUpdateField |
Constructor Summary | |
---|---|
Menu(Game game)
|
|
Menu(Game game,
SpriteGroup displayedgroup)
|
Method Summary | |
---|---|
void |
actOnKeyPressed(int key)
This method specifies which action to take upon a particular key press. |
void |
actOnMouseClicked()
This method specifies which action to take upon mouse click. |
Game |
getCurrentGame()
This method returns the current game that the menu belows to |
void |
initialize()
The initialize method sets up specific variables and parameters necessary to the specific functioning of the GameState. |
void |
render(java.awt.Graphics2D g)
This method displays the menuDisplay. |
void |
setActive(boolean state)
This method sets the the current menu to be active or inactive. |
void |
switchToMenu(Menu menu)
This method allows the user to set another menu to be active. |
void |
tagKeyToMenu(int key,
Menu menu)
This method associates a specific key to another menu. |
void |
tagMouseToMenu(Menu menu)
This method allows the user to associate the mouse click to a particular menu. |
void |
update(long elapsedTime)
This method updates the dynamic sprites and respond to user mouse and keyboard inputs. |
Methods inherited from class vooga.engine.state.GameState |
---|
activate, addGroup, addPlayField, addRenderPlayField, addRenderState, addState, addUpdatePlayField, addUpdateState, deactivate, equals, getGroup, getRenderField, getUpdateField, isActive, removeEverything |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Menu(Game game)
public Menu(Game game, SpriteGroup displayedgroup)
Method Detail |
---|
public void actOnMouseClicked()
public void actOnKeyPressed(int key)
key
- public void tagKeyToMenu(int key, Menu menu)
key
- (Java key events are integers)menu
- (Another menu the user wants the key to associate with)public void tagMouseToMenu(Menu menu)
menu
- (Another menu the user wnats the mouse click to associate with)public void switchToMenu(Menu menu)
menu
- public void setActive(boolean state)
state
- public Game getCurrentGame()
public void update(long elapsedTime)
update
in class GameState
public void render(java.awt.Graphics2D g)
render
in class GameState
g
- public void initialize()
GameState
initialize
in class GameState
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |