robocode.robotinterfaces
Interface IBasicEvents4

All Superinterfaces:
IBasicEvents, IBasicEvents2, IBasicEvents3
All Known Implementing Classes:
Ship

public interface IBasicEvents4
extends IBasicEvents3

Third extended version of the IBasicEvents interface.

Since:
1.8.3.0 Alpha 1
Author:
Thales B.V. / Jiri Waning / Thomas Hakkers

Method Summary
 void onHitByMine(HitByMineEvent event)
          Triggers when your Ship get hit by a Mine.
 void onMineHit(MineHitEvent event)
          Triggers when your Mine has hit a Ship (Can be your own Ship)
 void onMineHitMine(MineHitMineEvent event)
          Triggers when your Mine has hit another Mine.
 void onScannedShip(ScannedShipEvent event)
          This method is called when your robot sees another robot, i.e. when the robot's radar scan "hits" another robot.
 
Methods inherited from interface robocode.robotinterfaces.IBasicEvents3
onRoundEnded
 
Methods inherited from interface robocode.robotinterfaces.IBasicEvents2
onBattleEnded
 
Methods inherited from interface robocode.robotinterfaces.IBasicEvents
onBulletHit, onBulletHitBullet, onBulletMissed, onDeath, onHitByBullet, onHitRobot, onHitWall, onRobotDeath, onScannedRobot, onStatus, onWin
 

Method Detail

onScannedShip

void onScannedShip(ScannedShipEvent event)
This method is called when your robot sees another robot, i.e. when the robot's radar scan "hits" another robot. You should override it in your robot if you want to be informed of this event. (Almost all robots should override this!)

This is an extension on the onScannedRobot event. Rather then having the bearing from the center of your ship to the other ship. This event contains the bearings for both the front and the back canon. The only thing you have to do is rotate them by the given amount of degrees.

Parameters:
event - the scanned-robot event set by the game
See Also:
IBasicEvents.onScannedRobot(ScannedRobotEvent), ScannedRobotEvent, Event, Rules.RADAR_SCAN_RADIUS

onMineHitMine

void onMineHitMine(MineHitMineEvent event)
Triggers when your Mine has hit another Mine.

Parameters:
event - You can use this event to retrieve the Mine that hit and the Mine that got hit.

onMineHit

void onMineHit(MineHitEvent event)
Triggers when your Mine has hit a Ship (Can be your own Ship)

Parameters:
event - Has information like the Ship you hit, the Mine that hit and the energy left on that Ship.

onHitByMine

void onHitByMine(HitByMineEvent event)
Triggers when your Ship get hit by a Mine.

Parameters:
event - Contains the Mine that hit you, not much else.


Copyright © 2015 Robocode. All Rights Reserved.