|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.Event
robocode.BulletHitEvent
public final class BulletHitEvent
This event is sent to onBulletHit
when one of your bullets has hit another robot.
Constructor Summary | |
---|---|
BulletHitEvent(String name,
double energy,
Bullet bullet)
Called by the game to create a new BulletHitEvent . |
Method Summary | |
---|---|
Bullet |
getBullet()
Returns the bullet of yours that hit the robot. |
double |
getEnergy()
Returns the remaining energy of the robot your bullet has hit (after the damage done by your bullet). |
double |
getLife()
Deprecated. Use getEnergy() instead. |
String |
getName()
Returns the name of the robot your bullet hit. |
double |
getRobotLife()
Deprecated. Use getEnergy() instead. |
String |
getRobotName()
Deprecated. Use getName() instead. |
Methods inherited from class robocode.Event |
---|
compareTo, getPriority, getTime, setPriority, setTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BulletHitEvent(String name, double energy, Bullet bullet)
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 robotMethod Detail |
---|
public Bullet getBullet()
public double getEnergy()
@Deprecated public double getLife()
getEnergy()
instead.
public String getName()
@Deprecated public double getRobotLife()
getEnergy()
instead.
@Deprecated public String getRobotName()
getName()
instead.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |