|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--robocode.Event | +--robocode.ScannedRobotEvent
A ScannedRobotEvent is sent to Robot.onScannedRobot(robocode.ScannedRobotEvent)
when you scan a robot.
You can use the information contained in this event to determine what to do.
Constructor Summary | |
ScannedRobotEvent(String name,
double energy,
double bearing,
double distance,
double heading,
double velocity)
Called by the game to create a new ScannedRobotEvent. |
Method Summary | |
double |
getBearing()
Returns the angle to the robot, relative to your robot's heading, in degrees. |
double |
getBearingRadians()
Returns the angle to the robot, relative to your robot's heading, in radians. |
double |
getDistance()
Returns the distance to the robot you scanned (your center to his center). |
double |
getEnergy()
Returns the energy of the robot |
double |
getHeading()
Returns the direction the robot is facing, in degrees. |
double |
getHeadingRadians()
Returns the direction the robot is facing, in radians. |
double |
getLife()
Deprecated. use getEnergy() |
String |
getName()
Returns the name of the robot |
double |
getRobotBearing()
Deprecated. use getBearing() |
double |
getRobotBearingDegrees()
Deprecated. use getBearing() |
double |
getRobotBearingRadians()
Deprecated. use getBearingRadians() |
double |
getRobotDistance()
Deprecated. use getDistance() |
double |
getRobotHeading()
Deprecated. use getHeading() |
double |
getRobotHeadingDegrees()
Deprecated. use getHeading() |
double |
getRobotHeadingRadians()
Deprecated. use getHeadingRadians() |
double |
getRobotLife()
Deprecated. use getEnergy() |
String |
getRobotName()
Deprecated. use getName() |
double |
getRobotVelocity()
Deprecated. use getVelocity() |
double |
getVelocity()
Returns the velocity of the robot |
Methods inherited from class robocode.Event |
compareTo, getPriority, getTime, setPriority, setTime |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScannedRobotEvent(String name, double energy, double bearing, double distance, double heading, double velocity)
Method Detail |
public double getBearing()
public double getBearingRadians()
public double getDistance()
public double getEnergy()
public double getHeading()
public double getHeadingRadians()
public double getLife()
public String getName()
public double getRobotBearing()
public double getRobotBearingDegrees()
public double getRobotBearingRadians()
public double getRobotDistance()
public double getRobotHeading()
public double getRobotHeadingDegrees()
public double getRobotHeadingRadians()
public double getRobotLife()
public String getRobotName()
public double getRobotVelocity()
public double getVelocity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |