|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.app.AbstractGame
public abstract class AbstractGame
AbstractGame defines a common method for implementing game
functionality. Client applications should not subclass
AbstractGame directly.
| Nested Class Summary | |
|---|---|
static class |
AbstractGame.ConfigShowMode
|
| Method Summary | |
|---|---|
void |
finish()
finish breaks out of the main game loop. |
String |
getVersion()
getVersion returns the version of the API. |
void |
setConfigShowMode(AbstractGame.ConfigShowMode mode)
setConfigShowMode defines if and when the display
properties dialog should be shown. |
void |
setConfigShowMode(AbstractGame.ConfigShowMode mode,
URL imageOverride)
setConfigShowMode defines if and when the display
properties dialog should be shown as well as its accompanying image. |
abstract void |
start()
start begins the game. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getVersion()
getVersion returns the version of the API.
public void setConfigShowMode(AbstractGame.ConfigShowMode mode)
setConfigShowMode defines if and when the display
properties dialog should be shown. Setting the behaviour after
start has been called has no effect.
mode - properties dialog behaviour#@setConfigShowMode(ConfigShowMode, URL)
public void setConfigShowMode(AbstractGame.ConfigShowMode mode,
URL imageOverride)
setConfigShowMode defines if and when the display
properties dialog should be shown as well as its accompanying image.
Setting the behaviour after start has been called has no
effect.
mode - properties dialog behaviour.
ALWAYS_SHOW_PROPS, NEVER_SHOW_PROPS and
FIRSTRUN_OR_NOCONFIGFILE are the valid choices.imageOverride - URL specifying the filename of an image to be displayed
with the PropertiesDialog. Passing
null will result in no image being used.
You would normally use .getResource...() to get (and verify)
the URL.
For hacking or prototype, you can get image from filesystem
like new URL("file:" + filepath").public abstract void start()
start begins the game. The game is initialized by calling
first initSystem then initGame. Assuming
no errors were encountered during initialization, the main game loop is
entered. How the loop operates is implementation-dependent. After the
game loop is broken out of via a call to finish,
cleanup is called. Subclasses should declare this method
final.
public void finish()
finish breaks out of the main game loop. It is preferable
to call finish instead of quit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||