org.deken.game
Class ManualGameTimer

java.lang.Object
  extended by org.deken.game.GameTimer
      extended by org.deken.game.ManualGameTimer
All Implemented Interfaces:
InputListener

public abstract class ManualGameTimer
extends GameTimer
implements InputListener

Title: ManualGameTimer

Description:

Copyright: Copyright (c) Oct 19, 2014

Version:
1.0
Author:
Gary Deken

Field Summary
 
Fields inherited from class org.deken.game.GameTimer
listeners, MAX_FRAME_SKIPS, NO_DELAYS_PER_YIELD, period, running, timeListeners, totalTime
 
Constructor Summary
ManualGameTimer(int stepKey, int tenStepKey)
           
 
Method Summary
 void addInputAction(InputAction inputAction)
          add an InputAction for monitoring.
 void drawLabel(java.awt.Graphics2D g2d, int x, int y)
           
 int[] getInputActionIds()
          Gets the Key IDs.
 void notifyListener(InputAction inputAction)
          This method is called when any event occurs.
abstract  void paint()
           
abstract  void render()
           
 void run()
           
 void setUpdateOnKey(boolean updateOnKey)
           
abstract  void update(long deltaTime)
           
 
Methods inherited from class org.deken.game.GameTimer
addTimeListeners, isRunning, resetGameTime, setRefreshRate, setRunning, tick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManualGameTimer

public ManualGameTimer(int stepKey,
                       int tenStepKey)
Method Detail

update

public abstract void update(long deltaTime)
Specified by:
update in class GameTimer

render

public abstract void render()
Specified by:
render in class GameTimer

paint

public abstract void paint()
Specified by:
paint in class GameTimer

run

public void run()
Overrides:
run in class GameTimer

addInputAction

public void addInputAction(InputAction inputAction)
Description copied from interface: InputListener
add an InputAction for monitoring.

Specified by:
addInputAction in interface InputListener

drawLabel

public void drawLabel(java.awt.Graphics2D g2d,
                      int x,
                      int y)

getInputActionIds

public int[] getInputActionIds()
Description copied from interface: InputListener
Gets the Key IDs. This is mainly used for wiring the object into the current GameMap Actions.

Specified by:
getInputActionIds in interface InputListener
Returns:
Array of InputActionIDs

notifyListener

public void notifyListener(InputAction inputAction)
Description copied from interface: InputListener
This method is called when any event occurs.

Specified by:
notifyListener in interface InputListener
Parameters:
inputAction - InputAction

setUpdateOnKey

public void setUpdateOnKey(boolean updateOnKey)