Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
robocode.Event
robocode.ScannedRobotEvent
public class ScannedRobotEvent
extends Event
onScannedRobot()
when you scan a robot.
You can use the information contained in this event to determine what to do.
Constructor Summary | |
|
Method Summary | |
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
@Deprecated |
|
double |
|
double |
|
double |
|
double |
|
double |
|
double |
|
String |
|
double |
|
@Override |
|
Methods inherited from class robocode.Event | |
compareTo , getPriority , getTime , setPriority , setTime |
public ScannedRobotEvent(String name, double energy, double bearing, double distance, double heading, double velocity)
Called by the game to create a new ScannedRobotEvent.
- Parameters:
name
- the name of the scanned robotenergy
- the energy of the scanned robotbearing
- the bearing of the scanned robot, in radiansdistance
- the distance from your robot to the scanned robotheading
- the heading of the scanned robotvelocity
- the velocity of the scanned robot
public @Deprecated String getRobotName()
Deprecated. Use
getName()
instead.
- Returns:
- the name of the robot
public @Deprecated double getLife()
Deprecated. Use
getEnergy()
instead.
- Returns:
- the energy of the robot
public @Deprecated double getRobotBearing()
Deprecated. Use
getBearing()
instead.
- Returns:
- the bearing to the robot you scanned, in degrees
public @Deprecated double getRobotBearingDegrees()
Deprecated. Use
getBearing()
instead.
- Returns:
- the robot bearing in degrees
public @Deprecated double getRobotBearingRadians()
Deprecated. Use
getBearingRadians()
instead.
- Returns:
- the bearing to the robot you scanned, in radians
public @Deprecated double getRobotDistance()
Deprecated. Use
getDistance()
instead.
- Returns:
- the distance to the robot.
public @Deprecated double getRobotHeading()
Deprecated. Use
getHeading()
instead.
- Returns:
- the heading of the robot, in degrees
public @Deprecated double getRobotHeadingDegrees()
Deprecated. Use
getHeading()
instead.
- Returns:
- the heading of the robot, in degrees
public @Deprecated double getRobotHeadingRadians()
Deprecated. Use
getHeadingRadians()
instead.
- Returns:
- the heading of the robot, in radians
public @Deprecated double getRobotLife()
Deprecated. Use
getEnergy()
instead.
- Returns:
- the energy of the robot
public @Deprecated double getRobotVelocity()
Deprecated. Use
getVelocity()
instead.
- Returns:
- the velocity of the robot
public double getBearing()
Returns the bearing to the robot you scanned, relative to your robot's heading, in degrees (-180 <= getBearing() <32180)
- Returns:
- the bearing to the robot you scanned, in degrees
public double getBearingRadians()
Returns the bearing to the robot you scanned, relative to your robot's heading, in radians (-PI <= getBearingRadians() <32PI)
- Returns:
- the bearing to the robot you scanned, in radians
public double getDistance()
Returns the distance to the robot (your center to his center).
- Returns:
- the distance to the robot.
public double getEnergy()
Returns the energy of the robot.
- Returns:
- the energy of the robot
public double getHeading()
Returns the heading of the robot, in degrees (0 <= getHeading() <32360)
- Returns:
- the heading of the robot, in degrees
public double getHeadingRadians()
Returns the heading of the robot, in radians (0 <= getHeading() <322 * PI)
- Returns:
- the heading of the robot, in radians
public String getName()
Returns the name of the robot.
- Returns:
- the name of the robot
public double getVelocity()
Returns the velocity of the robot.
- Returns:
- the velocity of the robot