de.jadv.client
Class DrawThread
java.lang.Object
|
+--de.jadv.client.DrawThread
- All Implemented Interfaces:
- java.lang.Runnable
- public class DrawThread
- extends java.lang.Object
- implements java.lang.Runnable
Method Summary |
void |
run()
Called by the thread that was created in
the start method. |
void |
start()
Called when the applet becomes visible on
the screen. |
void |
stop()
Called when the GameWindow is no longer
visible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_delay
private int _delay
_animatorThread
private java.lang.Thread _animatorThread
_gameData
private GameData _gameData
_screen
private GameCanvas _screen
DrawThread
public DrawThread(GameData gameData,
GameCanvas gameCanvas)
DrawThread
public DrawThread(GameData gameData,
GameCanvas gameCanvas,
int fps)
start
public void start()
- Called when the applet becomes visible on
the screen. Create a thread and start it.
run
public void run()
- Called by the thread that was created in
the start method. It does the main animation.
- Specified by:
run
in interface java.lang.Runnable
stop
public void stop()
- Called when the GameWindow is no longer
visible. Set the animator variable to null so that the
thread will exit before displaying the next frame.