![]() |
MAK RTIspy API Documentation for HLA 1516
|
This is the abstract class to represent the basic components (X and Y) for drawing on the game board. More...
Inheritance diagram for common.Drawable:
Collaboration diagram for common.Drawable:Public Member Functions | |
| Drawable (int x, int y) | |
| Instantiates a new drawable. | |
| abstract void | draw (Graphics g) |
| This draws the shape. | |
| abstract Shape | getShape () |
| This returns an AWT shape which represents the Drawable. | |
| String | getName () |
| Gets the name. | |
| void | setName (String name) |
| Sets the name. | |
| int | getX () |
| Gets the x. | |
| void | setX (int x) |
| Sets the x. | |
| int | getY () |
| Gets the y. | |
| void | setY (int y) |
| Sets the y. | |
| boolean | isVisible () |
| Checks if is visible. | |
| void | setVisible (boolean isVisible) |
| Sets the visible. | |
| int | hashCode () |
| boolean | equals (Object obj) |
Protected Attributes | |
| String | name |
| The name. | |
| int | x |
| The x. | |
| int | y |
| The y. | |
| boolean | isVisible |
| The is visible. | |
This is the abstract class to represent the basic components (X and Y) for drawing on the game board.
It also forces implementation of a draw method.
| common.Drawable.Drawable | ( | int | x, |
| int | y | ||
| ) | [inline] |
Instantiates a new drawable.
| x | the x |
| y | the y |
References common.Drawable.isVisible(), common.Drawable.x, and common.Drawable.y.
Referenced by common.Drawable.equals().
| abstract void common.Drawable.draw | ( | Graphics | g | ) | [pure virtual] |
This draws the shape.
| g | the g |
Implemented in ui.draw.TriangleShip, and ui.draw.SquareShot.
Referenced by ui.GraphicsPanel.paintComponent().
| boolean common.Drawable.equals | ( | Object | obj | ) | [inline] |
Reimplemented in common.Ship, and common.Shot.
References common.Drawable.Drawable(), common.Drawable.x, and common.Drawable.y.
| String common.Drawable.getName | ( | ) | [inline] |
| abstract Shape common.Drawable.getShape | ( | ) | [pure virtual] |
This returns an AWT shape which represents the Drawable.
Implemented in ui.draw.TriangleShip, and ui.draw.SquareShot.
Referenced by controllers.ShotManager.performIntenseDetonationCheck().
| int common.Drawable.getX | ( | ) | [inline] |
Gets the x.
References common.Drawable.x.
Referenced by controllers.ShotManager.checkIfShotDetonates(), controllers.ShotManager.checkIfShotExitsBoard(), ui.draw.SquareShot.createShot(), ui.draw.SquareShot.draw(), ui.draw.SquareShot.getShape(), controllers.ShotManager.incrementShot(), controllers.KeyboardShipController.run(), controllers.KeyboardShipController.shoot(), and controllers.KeyboardShipController.TestShoot().
| int common.Drawable.getY | ( | ) | [inline] |
Gets the y.
References common.Drawable.y.
Referenced by ui.draw.SquareShot.createShot(), ui.draw.SquareShot.draw(), ui.draw.SquareShot.getShape(), controllers.KeyboardShipController.run(), controllers.KeyboardShipController.shoot(), and controllers.KeyboardShipController.TestShoot().
| int common.Drawable.hashCode | ( | ) | [inline] |
Reimplemented in common.Ship, and common.Shot.
References common.Drawable.x, and common.Drawable.y.
| boolean common.Drawable.isVisible | ( | ) | [inline] |
Checks if is visible.
Referenced by common.Drawable.Drawable(), common.Drawable.setVisible(), common.Shot.toString(), and common.Ship.toString().
| void common.Drawable.setName | ( | String | name | ) | [inline] |
Sets the name.
| name | the name to set |
References common.Drawable.name.
Referenced by federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.setShipByAttributes(), and ui.RTIActionHelper.startNewGame().
| void common.Drawable.setVisible | ( | boolean | isVisible | ) | [inline] |
Sets the visible.
| isVisible | the isVisible to set |
References common.Drawable.isVisible().
Referenced by federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.discoverNewShot(), controllers.ShotManager.generateInitialShotPool(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.reflectAttributeValuesShot(), controllers.ShotManager.removeShotFromUI(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.setShipByAttributes(), controllers.KeyboardShipController.shoot(), and ui.RTIActionHelper.startNewGame().
| void common.Drawable.setX | ( | int | x | ) | [inline] |
Sets the x.
| x | the new x |
References common.Drawable.x.
Referenced by controllers.ShotManager.incrementShot(), controllers.KeyboardShipController.moveShip(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.reflectAttributeValuesShot(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.setShipByAttributes(), and controllers.KeyboardShipController.shoot().
| void common.Drawable.setY | ( | int | y | ) | [inline] |
Sets the y.
| y | the new y |
References common.Drawable.y.
Referenced by controllers.KeyboardShipController.moveShip(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.reflectAttributeValuesShot(), federate.RTI1516e.MakShooterRTI1516eFederateAmbassador.setShipByAttributes(), and controllers.KeyboardShipController.shoot().
boolean common.Drawable.isVisible [protected] |
The is visible.
String common.Drawable.name [protected] |
The name.
Referenced by ui.draw.TriangleShip.draw(), common.Drawable.getName(), and common.Drawable.setName().
int common.Drawable.x [protected] |
int common.Drawable.y [protected] |