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

  NameDescription
Public propertyBearing
Returns the bearing to the robot you hit, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
Public propertyBearingRadians
Returns the bearing to the robot you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)
Public propertyEnergy
Returns the amount of energy of the robot you hit.
Public propertyIsMyFault
Checks if your robot was moving towards the robot that was hit.

If IsMyFault returns true then your robot's movement (including turning) will have stopped and been marked complete.

Note: If two robots are moving toward each other and collide, they will each receive two HitRobotEvents. The first will be the one if isMyFault() returns true.
Public propertyName
Returns the name of the robot you hit.
Public propertyPriority
The priority of this event.

An event priority is a value from 0 - 99. The higher value, the higher priority.

The default priority is 80, but varies depending on the type of event.

(Inherited from Event.)
Public propertyTime
The time when this event occurred.
(Inherited from Event.)
Back to Top
See Also