| Modifier and Type | Field and Description |
|---|---|
| private Game | game
The game in which the ship exists |
| private static final int | LEFT_BORDER
Left border at which to disallow further movement |
| private static final int | RIGHT_BORDER
Right border at which to disallow further movement |
| Access | Constructor and Description |
|---|---|
| public | ShipEntity(Game
The game in which the ship is being created game, String The reference to the sprite to show for the ship ref, int The initial x location of the player's ship x, int The initial y location of the player's ship y)Create a new entity to represent the players ship |
| Modifier and Type | Method and Description |
|---|---|
| public void | collidedWith(Entity
The entity with which the ship has collided other)Implements abstract org. |
| public void | move(long
The time that has elapsed since last move (ms) delta)Overrides org. |
| game | back to summary |
|---|---|
| private Game game The game in which the ship exists | |
| LEFT_BORDER | back to summary |
|---|---|
| private static final int LEFT_BORDER Left border at which to disallow further movement | |
| RIGHT_BORDER | back to summary |
|---|---|
| private static final int RIGHT_BORDER Right border at which to disallow further movement | |
| ShipEntity | back to summary |
|---|---|
| public ShipEntity(Game game, String ref, int x, int y) Create a new entity to represent the players ship | |
| collidedWith | back to summary |
|---|---|
| public void collidedWith(Entity other) Implements abstract org. Notification that the player's ship has collided with something
| |
| move | back to summary |
|---|---|
| public void move(long delta) Overrides org. Request that the ship move itself based on an elapsed ammount of time
| |