|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.brackeen.javagamebook.test.GameCore
public abstract class GameCore
Simple abstract class used for testing. Subclasses should implement the draw() method.
| Field Summary | |
|---|---|
protected static int |
FONT_SIZE
|
private boolean |
isRunning
|
private static java.awt.DisplayMode[] |
POSSIBLE_MODES
|
protected ScreenManager |
screen
|
| Constructor Summary | |
|---|---|
GameCore()
|
|
| Method Summary | |
|---|---|
abstract void |
draw(java.awt.Graphics2D g)
Draws to the screen. |
void |
gameLoop()
Runs through the game loop until stop() is called. |
void |
init()
Sets full screen mode and initiates and objects. |
void |
lazilyExit()
Exits the VM from a daemon thread. |
java.awt.Image |
loadImage(java.lang.String fileName)
|
void |
run()
Calls init() and gameLoop() |
void |
stop()
Signals the game loop that it's time to quit |
void |
update(long elapsedTime)
Updates the state of the game/animation based on the amount of elapsed time that has passed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int FONT_SIZE
private static final java.awt.DisplayMode[] POSSIBLE_MODES
private boolean isRunning
protected ScreenManager screen
| Constructor Detail |
|---|
public GameCore()
| Method Detail |
|---|
public void stop()
public void run()
public void lazilyExit()
public void init()
public java.awt.Image loadImage(java.lang.String fileName)
public void gameLoop()
public void update(long elapsedTime)
public abstract void draw(java.awt.Graphics2D g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||