|
|||||||
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
This class adds meathods and information needed by the active elements (such as a battery and turret)
Field Summary | |
protected Battery |
theBattery
|
protected Turret |
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 | |
AnimateGameElement(Location theLocation,
Velocity theVelocity,
int radius,
int health,
RobotContainer theContainer)
This is the constructor used when you want a default battery |
|
AnimateGameElement(Location theLocation,
Velocity theVelocity,
int radius,
int health,
RobotContainer theContainer,
Battery bat)
This is the constructor used when you want to specify a battery |
Method Summary | |
abstract void |
collision(GameElement other)
This is the abstract method used when a subclass collides with another element |
Battery |
getBattery()
Returns the battery that this element uses |
Turret |
getTurret()
Returns the turret that this element uses |
Methods inherited from class lane.sente.GameElement |
acceptDammage, getHealth, getLocation, getRadius, getVelocity, isCollision, setHealth, setLocation, setRadius, updateListeners, xCollision, yCollision, zCollision |
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, run, 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 Battery theBattery
protected Turret theTurret
Constructor Detail |
public AnimateGameElement(Location theLocation, Velocity theVelocity, int radius, int health, RobotContainer theContainer)
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 elementpublic AnimateGameElement(Location theLocation, Velocity theVelocity, int radius, int health, RobotContainer theContainer, Battery bat)
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 elementbat
- The battery to be used by this elementMethod Detail |
public Battery getBattery()
public Turret getTurret()
public abstract void collision(GameElement other)
collision
in class GameElement
The
- element that is collided with
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |