robocode
Class BulletHitEvent
- Comparable
public class BulletHitEvent
This event is sent to
onBulletHit
when one of your bullets has hit another robot.
- Mathew A. Nelson (original)
BulletHitEvent(String name, double energy, Bullet bullet) - Called by the game to create a new
BulletHitEvent .
|
BulletHitEvent
public BulletHitEvent(String name,
double energy,
Bullet bullet)
Called by the game to create a new BulletHitEvent
.
name
- the name of the robot your bullet hitenergy
- the remaining energy of the robot that your bullet has hitbullet
- the bullet that hit the robot
String getRobotName
public @Deprecated String getRobotName()
Use getName()
instead.
- the name of the robot your bullet hit.
double getLife
public @Deprecated double getLife()
Use getEnergy()
instead.
- energy the remaining energy of the robot that your bullet has hit
double getRobotLife
public @Deprecated double getRobotLife()
Use getEnergy()
instead.
- energy the remaining energy of the robot that your bullet has hit
getBullet
public Bullet getBullet()
Returns the bullet of yours that hit the robot.
- the bullet that hit the robot
getEnergy
public double getEnergy()
Returns the remaining energy of the robot your bullet has hit (after the
damage done by your bullet).
- energy the remaining energy of the robot that your bullet has hit
getName
public String getName()
Returns the name of the robot your bullet hit.
- the name of the robot your bullet hit.