Class HitByBulletEvent
- java.lang.Object
-
- dev.robocode.tankroyale.botapi.events.BotEvent
-
- dev.robocode.tankroyale.botapi.events.HitByBulletEvent
-
-
Constructor Summary
Constructors Constructor Description HitByBulletEvent(int turnNumber, BulletState bullet, double damage, double energy)
Initializes a new instance of the HitByBulletEvent class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BulletState
getBullet()
Returns the bullet that hit your bot.double
getDamage()
Returns the damage inflicted by the bullet.double
getEnergy()
Returns the remaining energy level after the bullet hit.-
Methods inherited from class dev.robocode.tankroyale.botapi.events.BotEvent
getTurnNumber, isCritical
-
-
-
-
Constructor Detail
-
HitByBulletEvent
public HitByBulletEvent(int turnNumber, BulletState bullet, double damage, double energy)
Initializes a new instance of the HitByBulletEvent class.- Parameters:
turnNumber
- is the turn number when the bullet has hit a bot.bullet
- is the bullet that hit the bot.damage
- is the damage inflicted by the bullet.energy
- is the remaining energy level of the bot that got hit.
-
-
Method Detail
-
getBullet
public BulletState getBullet()
Returns the bullet that hit your bot.- Returns:
- The bullet that hit your bot.
-
getDamage
public double getDamage()
Returns the damage inflicted by the bullet.- Returns:
- The damage inflicted by the bullet.
-
getEnergy
public double getEnergy()
Returns the remaining energy level after the bullet hit.- Returns:
- The remaining energy level after the bullet hit.
-
-