The Bullet type exposes the following members.
Back to Top
Returns the direction the bullet is/was heading, in degrees (0 <= getHeading() < 360). This is not relative to the direction you are facing.
Returns the direction the bullet is/was heading, in radians (0 <= getHeadingRadians() < 2 * Math.PI). This is not relative to the direction you are facing.
Checks if this bullet is still active on the battlefield.
Returns the name of the robot that fired this bullet.
Returns the power of this bullet. The bullet will do (4 * power) damage if it hits another robot. If power is greater than 1, it will do an additional 2 * (power - 1) damage. You will get (3 * power) back if you hit the other robot.
Returns the velocity of this bullet. The velocity of the bullet is constant once it has been fired.
Returns the name of the robot that this bullet hit, or null if the bullet has not hit a robot.
Returns the X position of the bullet.
Returns the Y position of the bullet.