|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.Event
robocode.HitWallEvent
public final class HitWallEvent
A HitWallEvent is sent to onHitWall()
when you collide a wall.
You can use the information contained in this event to determine what to do.
Constructor Summary | |
---|---|
HitWallEvent(double bearing)
Called by the game to create a new HitWallEvent. |
Method Summary | |
---|---|
double |
getBearing()
Returns the bearing to the wall you hit, relative to your robot's heading, in degrees (-180 <= getBearing() < 180) |
double |
getBearingDegrees()
Deprecated. Use getBearing() instead. |
double |
getBearingRadians()
Returns the bearing to the wall you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI) |
Methods inherited from class robocode.Event |
---|
compareTo, getPriority, getTime, setPriority, setTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HitWallEvent(double bearing)
bearing
- the bearing to the wall that your robot hit, in radiansMethod Detail |
---|
public double getBearing()
@Deprecated public double getBearingDegrees()
getBearing()
instead.
public double getBearingRadians()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |