|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.lang.Thread
|
+--lane.sente.GameElement
|
+--lane.sente.AnimateGameElement
|
+--lane.sente.Robot
| Field Summary | |
protected java.util.Vector |
listeners
|
protected java.lang.String |
name
|
protected RobotController |
theController
|
| Fields inherited from class lane.sente.AnimateGameElement |
theBattery, theTurret |
| Fields inherited from class lane.sente.GameElement |
health, radius, theContainer, theLocation, theVelocity |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Robot(Location theLocation,
Velocity theVelocity,
int radius,
int health,
RobotContainer theContainer,
RobotController theController)
the constructor for the Robot |
|
| Method Summary | |
void |
addListener(RobotListener listener)
method to add a listener for this robot |
void |
AnimateGameElementSighting(AnimateGameElement element)
method called when the robot sights an AnimateGameElement |
void |
collision(GameElement other)
method called when this robot collides with another element |
void |
InanimateGameElementSighting(InanimateGameElement element)
method called when the robot sights an InAnimateGameElement |
void |
run()
the run method |
protected void |
updateListeners()
used to update objects listening to the robot |
void |
xCollision()
method called when the robot collides along the X wall |
void |
yCollision()
method called when the robot collides along the Y wall |
void |
zCollision()
method called when the robot collides along the Z wall |
| Methods inherited from class lane.sente.AnimateGameElement |
getBattery, getTurret |
| Methods inherited from class lane.sente.GameElement |
acceptDammage, getHealth, getLocation, getRadius, getVelocity, isCollision, setHealth, setLocation, setRadius |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected RobotController theController
protected java.util.Vector listeners
| Constructor Detail |
public Robot(Location theLocation,
Velocity theVelocity,
int radius,
int health,
RobotContainer theContainer,
RobotController theController)
theLocation - The location where this element beginstheVelocity - The velocity with which this element beginsradius - The radius of the elementhealth - The maximum health of this elementtheContainer - The RobotContainer that holds this elementtheController - The class that will controll this robot| Method Detail |
public void run()
run in class java.lang.Threadprotected void updateListeners()
updateListeners in class GameElementpublic void addListener(RobotListener listener)
listener - The object that will listen to this objectpublic void collision(GameElement other)
collision in class AnimateGameElementother - The other element that this robot collided withpublic void xCollision()
xCollision in class GameElementpublic void yCollision()
yCollision in class GameElementpublic void zCollision()
zCollision in class GameElementpublic void InanimateGameElementSighting(InanimateGameElement element)
element - The sighted InAnimateElementpublic void AnimateGameElementSighting(AnimateGameElement element)
element - The sighted AnimateElement
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||