|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.golden.gamedev.GameEngine
Abstract class that wrapping all available Game Engine.
This class also provide global variables that can access
within all GameObject.
Any shared variables among all GameObject should place in here,
such as game cursor, user properties, etc.
Title: Game Engine
Description: Engine for creating Java Games
Copyright: Copyright (c) 2004
Company: Golden T Corporation
GameObject
Field Summary | |
BaseGraphics |
bsGraphics
|
BaseInput |
bsInput
|
BaseIO |
bsIO
|
BaseLoader |
bsLoader
|
BaseAudio |
bsMusic
|
BaseAudio |
bsSound
|
BaseTimer |
bsTimer
|
GameFontManager |
fontManager
|
int |
nextGame
|
Constructor Summary | |
GameEngine(BaseGraphics gfx)
|
Method Summary | |
protected void |
cleanup()
Releases all game resources, and do finalization. |
GameObject |
currentGame()
|
int |
currentGameID()
|
void |
finish()
End the game, and back to Operating System |
int |
getCurrentFPS()
|
abstract GameObject |
getGame(int GameID)
Returns GameObject with specific ID to be played next. |
int |
getHeight()
|
int |
getRequestedFPS()
|
int |
getWidth()
|
void |
hideCursor()
|
protected void |
initEngine()
|
void |
playMusic(String audiofile)
|
void |
playSound(String audiofile)
|
void |
refresh()
Refresh game global variables. |
void |
render(Graphics2D g)
Common game render. |
void |
setFPS(int fps)
|
void |
setMaskColor(Color c)
|
void |
showCursor()
|
void |
start()
Starts the game, GameObject with ID = 1
will be the first game to be played. |
void |
update()
Common game update. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final BaseGraphics bsGraphics
public BaseIO bsIO
public BaseLoader bsLoader
public BaseInput bsInput
public BaseTimer bsTimer
public BaseAudio bsMusic
public BaseAudio bsSound
public GameFontManager fontManager
public int nextGame
Constructor Detail |
public GameEngine(BaseGraphics gfx)
Method Detail |
protected void initEngine()
public int getWidth()
public int getHeight()
public void playMusic(String audiofile)
public void playSound(String audiofile)
public void setFPS(int fps)
public int getCurrentFPS()
public int getRequestedFPS()
public void setMaskColor(Color c)
public void hideCursor()
public void showCursor()
public void start()
GameObject
with ID = 1
will be the first game to be played.
getGame(int GameID)
protected void cleanup()
public void refresh()
public void update()
The implementation of this method provided by the GameEngine does nothing.
public void render(Graphics2D g)
The implementation of this method provided by the GameEngine does nothing.
g
- graphics backbuffer.public abstract GameObject getGame(int GameID)
GameID
- the id of the GameObject
nextGame
public void finish()
public int currentGameID()
public GameObject currentGame()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |