Class com.next.gt.Gamelet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.next.gt.Gamelet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----com.next.gt.Gamelet

public class Gamelet
extends Applet
implements Runnable

Variable Index

 o actorManager
 o currentTickTimeMillis
 o displayManager
 o eventManager
 o lastTickTimeMillis
 o runner
 o scoreManager
 o SLEEP_MILLIS

Constructor Index

 o Gamelet()

Method Index

 o deltaTickTimeMillis()
Calculater the difference between the current tick and the last one.
 o getAppletInfo()
Provide standard Gamelet info.
 o handleEvent(Event)
Pass the event along to the EventManager for handling.
 o init()
Initialize.
 o paint(Graphics)
Pass the Graphics onto the DisplayManager.
 o randBetween(double, double)
Generate a random double between two doubles.
 o run()
Execution loop.
 o sleepMillis()
 o start()
Start the thread.
 o stop()
Stop the thread.
 o tick()
Distribute tick to the ActorManager and update display.
 o update(Graphics)
Override update to avoid screen clears.

Variables

 o runner
  public Thread runner
 o currentTickTimeMillis
  public long currentTickTimeMillis
 o lastTickTimeMillis
  public long lastTickTimeMillis
 o actorManager
  public ActorManager actorManager
 o displayManager
  public DisplayManager displayManager
 o scoreManager
  public ScoreManager scoreManager
 o eventManager
  public EventManager eventManager
 o SLEEP_MILLIS
  public int SLEEP_MILLIS

Constructors

 o Gamelet
  public Gamelet()

Methods

 o randBetween
  public static double randBetween(double a,
                                   double b)
Generate a random double between two doubles.
 o init
  public void init()
Initialize.
Overrides:
init in class Applet
 o start
  public void start()
Start the thread.
Overrides:
start in class Applet
 o stop
  public void stop()
Stop the thread.
Overrides:
stop in class Applet
 o sleepMillis
  public long sleepMillis()
 o run
  public void run()
Execution loop. Used to call tick().
 o tick
  public void tick()
Distribute tick to the ActorManager and update display.
 o handleEvent
  public boolean handleEvent(Event theEvent)
Pass the event along to the EventManager for handling.
Overrides:
handleEvent in class Component
 o deltaTickTimeMillis
  public double deltaTickTimeMillis()
Calculater the difference between the current tick and the last one.
 o update
  public void update(Graphics g)
Override update to avoid screen clears.
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Pass the Graphics onto the DisplayManager.
Overrides:
paint in class Component
 o getAppletInfo
  public String getAppletInfo()
Provide standard Gamelet info.
Overrides:
getAppletInfo in class Applet

All Packages  Class Hierarchy  This Package  Previous  Next  Index