org.jtgl.micro
Class GameMapplet
java.lang.Object
org.jtgl.micro.Mapplet
org.jtgl.micro.GameMapplet
- All Implemented Interfaces:
- java.lang.Runnable
public abstract class GameMapplet
- extends Mapplet
- implements java.lang.Runnable
GameMapplet is a base class for a gaming Mapplet.
- Author:
- Manuel Polo (manuel_polo at yahoo dot es)
Methods inherited from class org.jtgl.micro.Mapplet |
createImage, createImage, createImage, debugMsg, delay, flushGraphics, get, getAvailableInputControls, getDisplayColors, getGraphics, getHeight, getImageUtil, getInputControl, getWidth, handleException, handleException, initialize, initialize, notifyKill, setDebug |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REFRESH_MANUAL
public static final int REFRESH_MANUAL
- See Also:
- Constant Field Values
REFRESH_AUTO
public static final int REFRESH_AUTO
- See Also:
- Constant Field Values
MIN_FPS
public static final int MIN_FPS
- See Also:
- Constant Field Values
MAX_FPS
public static final int MAX_FPS
- See Also:
- Constant Field Values
GameMapplet
public GameMapplet()
start
public void start()
- Description copied from class:
Mapplet
- Start Mapplet
- Overrides:
start
in class Mapplet
pause
public void pause()
- Description copied from class:
Mapplet
- Pause Mapplet
- Overrides:
pause
in class Mapplet
reset
public void reset()
- Dirty method for complete reinitialization of game
kill
public void kill(boolean force)
throws JTGLException
- Kill Mapplet
- Overrides:
kill
in class Mapplet
- Throws:
JTGLException
setRefreshType
public void setRefreshType(int type)
getRefreshType
public int getRefreshType()
refreshGraphics
public void refreshGraphics()
setFps
public final void setFps(int fps)
getFps
public final int getFps()
enableFPSMeasure
public void enableFPSMeasure(boolean enable)
getFrameCounter
public final long getFrameCounter()
getRealFPS
public final long getRealFPS()
getRealMFPS
public final long getRealMFPS()
getFrameTime
public final long getFrameTime()
getMaxFrameTime
public final long getMaxFrameTime()
getMinFrameTime
public final long getMinFrameTime()
getKeys
public int getKeys()
getRandom
public int getRandom(int to)
getRandom
public int getRandom(int from,
int to)
isRunning
public boolean isRunning()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
initGame
protected void initGame()
throws java.lang.Exception
- Throws:
java.lang.Exception
processGameLogic
protected abstract void processGameLogic()
drawGameScene
protected abstract void drawGameScene()