|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrc.yoda.utils.Gun
public class Gun
Gun - A class that defines the events a robocode gun can use
| Constructor Summary | |
|---|---|
Gun(robocode.AdvancedRobot robot)
Class Constructor specifying the robot this gun is virtually mounted on |
|
| Method Summary | |
|---|---|
double |
getBulletPower()
getBulletPower - called by the gun array to get the desired bullet power for this gun |
double |
getFireAngle()
getFireAngle - called by the gun array to get the desired firing angle for this gun angle 0.0: means directly at the enemy |
void |
onBulletHit(robocode.BulletHitEvent e)
onBulletHit - called by robocode when one of our bullets hit the enemy |
void |
onBulletHitBullet(robocode.BulletHitBulletEvent e)
onBulletHitBullet - called by robocode when one of our bullets hits an enemy bullet |
void |
onBulletMissed(robocode.BulletMissedEvent e)
onBulletMissed - called by robocode when one of our bullets hit a wall |
void |
onDeath(robocode.DeathEvent e)
onDeath - called by robocode when our robot dies |
void |
onPaint(java.awt.Graphics2D g)
onPaint - called by robocode when our robot can draw to the screen |
void |
onScannedRobot(robocode.ScannedRobotEvent e)
onScannedRobot - called by robocode when our robot scans the enemy |
void |
onWin(robocode.WinEvent e)
onWin - called by robocode when our robot wins a round |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Gun(robocode.AdvancedRobot robot)
| Method Detail |
|---|
public void onScannedRobot(robocode.ScannedRobotEvent e)
ScannedRobotEvent - - enemy informationpublic void onBulletHit(robocode.BulletHitEvent e)
ScannedRobotEvent - - enemy informationpublic void onBulletMissed(robocode.BulletMissedEvent e)
onBulletMissed - - missed bullet infopublic void onBulletHitBullet(robocode.BulletHitBulletEvent e)
BulletHitBulletEvent - - colliding bullet informationpublic void onDeath(robocode.DeathEvent e)
DeathEvent - public void onWin(robocode.WinEvent e)
onWin - public void onPaint(java.awt.Graphics2D g)
Graphic2D - - painting toolpublic double getFireAngle()
public double getBulletPower()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||