Class BulletHitBotEvent
java.lang.Object
dev.robocode.tankroyale.botapi.events.BotEvent
dev.robocode.tankroyale.botapi.events.BulletHitBotEvent
-
Constructor Summary
ConstructorDescriptionBulletHitBotEvent
(int turnNumber, int victimId, BulletState bullet, double damage, double energy) Initializes a new instance of the BulletHitBotEvent class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bullet that hit the bot.double
Returns the damage inflicted by the bullet.double
Returns the remaining energy level of the bot that got hit.int
Returns the id of the victim bot that got hit.Methods inherited from class dev.robocode.tankroyale.botapi.events.BotEvent
getTurnNumber, isCritical
-
Constructor Details
-
BulletHitBotEvent
public BulletHitBotEvent(int turnNumber, int victimId, BulletState bullet, double damage, double energy) Initializes a new instance of the BulletHitBotEvent class.- Parameters:
turnNumber
- is the turn number when the bullet has hit a bot.victimId
- is the id of the victim bot that got hit.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 Details
-
getVictimId
public int getVictimId()Returns the id of the victim bot that got hit.- Returns:
- The id of the victim bot that got hit.
-
getBullet
Returns the bullet that hit the bot.- Returns:
- The bullet that hit the 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 of the bot that got hit.- Returns:
- The remaining energy level of the bot that got hit.
-