Bullet PropertiesRobocode Robot API for .NET
The Bullet type exposes the following members.
Properties

  NameDescription
Public propertyHeading
Returns the direction the bullet is/was heading, in degrees (0 <= getHeading() < 360). This is not relative to the direction you are facing.
Public propertyHeadingRadians
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.
Public propertyIsActive
Checks if this bullet is still active on the battlefield.
Public propertyName
Returns the name of the robot that fired this bullet.
Public propertyPower
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.
Public propertyVelocity
Returns the velocity of this bullet. The velocity of the bullet is constant once it has been fired.
Public propertyVictim
Returns the name of the robot that this bullet hit, or null if the bullet has not hit a robot.
Public propertyX
Returns the X position of the bullet.
Public propertyY
Returns the Y position of the bullet.
Back to Top
See Also