The Class KeyboardShipController.
More...
Private Member Functions |
| void | repaint () |
| | Repaint.
|
Static Private Attributes |
| static final int | SHOT_COOLDOWN = 500 |
| static final int | DELAY = 70 |
| | The Constant DELAY.
|
Detailed Description
The Class KeyboardShipController.
- Author
- snandi
Constructor & Destructor Documentation
Member Function Documentation
| void controllers.KeyboardShipController.formKeyPressed |
( |
KeyEvent |
evt | ) |
|
|
inlineprotected |
| void controllers.KeyboardShipController.formKeyReleased |
( |
KeyEvent |
evt | ) |
|
|
inlineprotected |
| void controllers.KeyboardShipController.moveShip |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inlinevirtual |
| void controllers.KeyboardShipController.repaint |
( |
| ) |
|
|
inlineprivate |
| void controllers.KeyboardShipController.run |
( |
| ) |
|
|
inline |
This will start the keyboard Controller, allowing you to move one ship up and down using the UP Arrow and DOWN Arrow keys.
References controllers.KeyboardShipController.board, ui.MakShooterUIConstants.DEFAULT_BOARD_HEIGHT, ui.MakShooterUIConstants.DEFAULT_SHIP_SIZE, ui.MakShooterUIConstants.DEFAULT_SHIP_Y_SHIFT, controllers.KeyboardShipController.DELAY, controllers.IShipController.finished, common.Drawable.getX(), common.Drawable.getY(), controllers.KeyboardShipController.moveDown, controllers.KeyboardShipController.moveShip(), controllers.KeyboardShipController.moveUp, ui.Board.myKeyboardHackForLinux(), controllers.KeyboardShipController.repaint(), and controllers.KeyboardShipController.ship.
Referenced by controllers.KeyboardShipController.shoot().
| void controllers.KeyboardShipController.shipActionPressed |
( |
KeyEvent |
evt | ) |
|
|
inline |
| void controllers.KeyboardShipController.shipActionReleased |
( |
KeyEvent |
evt | ) |
|
|
inline |
| void controllers.KeyboardShipController.shoot |
( |
| ) |
|
|
inlinevirtual |
Shoot.
Implements controllers.IShipController.
References controllers.ShotManager.addNewShot(), common.Ship.getAlignment(), controllers.ShotManager.getInstance(), controllers.ShotManager.getShotFromShotPool(), common.Drawable.getX(), common.Drawable.getY(), controllers.KeyboardShipController.run(), common.Shot.setAlignment(), common.Drawable.setVisible(), common.Drawable.setX(), common.Drawable.setY(), controllers.KeyboardShipController.ship, controllers.KeyboardShipController.SHOT_COOLDOWN, controllers.KeyboardShipController.shotCooldownActive, and controllers.KeyboardShipController.timer.
Referenced by controllers.KeyboardShipController.shipActionReleased().
| void controllers.KeyboardShipController.TestShoot |
( |
Ship |
ship | ) |
|
|
inline |
Member Data Documentation
| final Board controllers.KeyboardShipController.board |
|
private |
| final int controllers.KeyboardShipController.DELAY = 70 |
|
staticprivate |
| boolean controllers.KeyboardShipController.moveDown = false |
|
private |
| boolean controllers.KeyboardShipController.moveUp = false |
|
private |
| final Ship controllers.KeyboardShipController.ship |
|
private |
| final int controllers.KeyboardShipController.SHOT_COOLDOWN = 500 |
|
staticprivate |
| boolean controllers.KeyboardShipController.shotCooldownActive = false |
|
private |
| Timer controllers.KeyboardShipController.timer |
|
private |
The documentation for this class was generated from the following file: