All Packages Class Hierarchy This Package Previous Next Index
Class pinball.player.tracker.TrackerStrategy
java.lang.Object
|
+----java.lang.Thread
|
+----pinball.player.Strategy
|
+----pinball.player.tracker.TrackerStrategy
- public class TrackerStrategy
- extends Strategy
The player tracks the ball's progress.
-
lastTime
- Time between missed ball's till previous locations are erased.
-
lastX
- Last ball's location.
-
lastY
- Last ball's location.
-
locations
- Previous ball location's.
-
maxLocations
- Number of previous locations found.
-
TrackerStrategy(Buffer, TextArea, Camera)
-
The strategy thread for the player.
-
draw(Graphics, int, int)
- Draw some objects for the person touch.
-
special()
- Find the angle and store previous locations.
locations
protected Vector locations
- Previous ball location's.
maxLocations
protected int maxLocations
- Number of previous locations found.
lastX
protected int lastX
- Last ball's location.
lastY
protected int lastY
- Last ball's location.
lastTime
protected long lastTime
- Time between missed ball's till previous locations are erased.
TrackerStrategy
public TrackerStrategy(Buffer buffer,
TextArea gameStats,
Camera camera)
- The strategy thread for the player.
- Parameters:
- buffer - the first buffer in the series of buffers for the system.
- gameStats - the area to write the game stats to.
- camera - the camera for the system.
special
public void special()
- Find the angle and store previous locations.
- Overrides:
- special in class Strategy
draw
public void draw(Graphics g,
int canvasWidth,
int canvasHeight)
- Draw some objects for the person touch. If they touch them, change the object's color.
- Parameters:
- g - the graphics to draw to.
- cavasWidth - the width of the canvas.
- canvcasHeight - the hight of the canvas.
- Overrides:
- draw in class Strategy
All Packages Class Hierarchy This Package Previous Next Index