public final class HitWallEvent extends Event
onHitWall()
when you collide a wall.
You can use the information contained in this event to determine what to do.Constructor and Description |
---|
HitWallEvent(double bearing)
Called by the game to create a new HitWallEvent.
|
Modifier and Type | Method and Description |
---|---|
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)
|
compareTo, getPriority, getTime, setPriority, setTime
public HitWallEvent(double bearing)
bearing
- the bearing to the wall that your robot hit, in radianspublic double getBearing()
@Deprecated public double getBearingDegrees()
getBearing()
instead.public double getBearingRadians()
Copyright © 2021 Robocode. All Rights Reserved.