Serializable
, Comparable<Event>
public final class BulletHitEvent extends Event
onBulletHit
when one of your bullets has hit another robot.Constructor | Description |
---|---|
BulletHitEvent(String name,
double energy,
Bullet bullet) |
Called by the game to create a new
BulletHitEvent . |
Modifier and Type | Method | Description |
---|---|---|
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. |
compareTo, getPriority, getTime, setPriority, setTime
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.Copyright © 2018. All rights reserved.