|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgroup1.model.Game
public class Game
The game class. This is sort of the "main" model class. This controls time clicks in the environment, moving between levels, and menus. It's also responsible for sending events on these things to the view.
| Constructor Summary | |
|---|---|
Game()
The game constructor. |
|
| Method Summary | |
|---|---|
void |
addPoints(int points)
Add points to the total score. |
Jeff |
getJeff()
Returns Jeff to the master class |
int |
getLevelCount()
Returns the result of the level counter. |
int |
getScore()
Get the current score. |
void |
incrementLevelCount()
Increment the level counter by one (when Jeff reaches the end of a level |
void |
instructions(InstructionsEvent i)
|
int |
inTheMainMenu()
In the main menu... |
java.lang.String |
levelName()
Returns the appropriate level name when passed the level counter. |
void |
loadGame()
|
void |
mainMenu(MainMenuEvent m)
|
void |
newGame()
|
void |
pause(PauseMenuEvent p)
|
void |
pauseEnvironment()
|
void |
playAudio(Audio a)
Play the requested audio. |
void |
quit()
|
void |
resumeEnvironment()
|
void |
run()
Run the game, by running time clicks in the environment. |
void |
saveGame()
|
void |
setAudioListener(AudioListener m)
Sets the audio listener |
void |
setBuyMenuListener(BuyMenuListener m)
Sets the buy menu listener |
void |
setContinueMenuListener(ContinueMenuListener m)
Sets the continue menu listener |
void |
setEndOfLevelListener(EndOfLevelListener m)
Sets the end of level listener |
void |
setInGameListener(InGameListener m)
Sets the in game listener |
void |
setInstructionsListener(InstructionsListener m)
Sets the instructions listener |
void |
setJeffDiesListener(JeffDiesListener m)
Sets the Jeff dies listener |
void |
setLoadListener(LoadListener m)
Sets the load listener |
void |
setMainMenuListener(MainMenuListener m)
Sets the main menu listener |
void |
setNewGameListener(NewGameListener m)
Sets the new game listener |
void |
setPauseMenuListener(PauseMenuListener m)
Sets the pause menu listener |
void |
setSaveListener(SaveListener m)
Sets the save listener |
void |
setStartOfLevelListener(StartOfLevelListener m)
Sets the set start of level listener |
void |
setWeaponsSwitchMenuListener(WeaponSwitchMenuListener m)
Sets the weapon switch menu listener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Game()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void incrementLevelCount()
public int getLevelCount()
public java.lang.String levelName()
public void pause(PauseMenuEvent p)
public void instructions(InstructionsEvent i)
public void pauseEnvironment()
public void resumeEnvironment()
public void mainMenu(MainMenuEvent m)
public void quit()
public void newGame()
public void saveGame()
public void loadGame()
public Jeff getJeff()
public void setMainMenuListener(MainMenuListener m)
m - the model listenerpublic void setPauseMenuListener(PauseMenuListener m)
m - the model listenerpublic void setBuyMenuListener(BuyMenuListener m)
m - the model listenerpublic void setContinueMenuListener(ContinueMenuListener m)
m - the model listenerpublic void setWeaponsSwitchMenuListener(WeaponSwitchMenuListener m)
m - the model listenerpublic void setNewGameListener(NewGameListener m)
m - the model listenerpublic void setSaveListener(SaveListener m)
m - the model listenerpublic void setLoadListener(LoadListener m)
m - the model listenerpublic void setInstructionsListener(InstructionsListener m)
m - the model listenerpublic void setStartOfLevelListener(StartOfLevelListener m)
m - the model listenerpublic void setEndOfLevelListener(EndOfLevelListener m)
m - the model listenerpublic void setJeffDiesListener(JeffDiesListener m)
m - the model listenerpublic void setInGameListener(InGameListener m)
m - the model listenerpublic void setAudioListener(AudioListener m)
m - the audio listenerpublic int inTheMainMenu()
public void playAudio(Audio a)
a - The enum type of the requested audio.
//@return Whether or not this method was successful.public void addPoints(int points)
points - The number of points to add.public int getScore()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||