public abstract class AbstractShip extends AbstractGameObject
panel| Constructor and Description |
|---|
AbstractShip(int healthPoints,
java.lang.String imageLocation)
The constructor takes HP and sptire location
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
initializeLocation()
This method is called when a game object is created and is ready to be given a location on a panel.
|
abstract void |
moveDirection()
This method moves the object only in terms of direction (rotation).
|
void |
movePosition()
Moves the position of the ship by increasing position with velocity.
|
draw, getCenter, getDirection, getHealthPoints, getHeight, getImage, getPosition, getWidth, getXCenter, getXDirection, getXPosition, getXVelocity, getYCenter, getYDirection, getYPosition, getYVelocity, gotHit, isDead, makeDead, move, setDirection, setDirectionToward, setHealthPoints, setImage, setImageLocation, setPosition, setXDirection, setXPosition, setXVelocity, setYDirection, setYPosition, setYVelocitypublic AbstractShip(int healthPoints,
java.lang.String imageLocation)
healthPoints - HPimageLocation - sprite locatoinpublic void movePosition()
movePosition in interface GameObjectmovePosition in class AbstractGameObjectpublic abstract void moveDirection()
GameObjectmoveDirection in interface GameObjectmoveDirection in class AbstractGameObjectpublic abstract void initializeLocation()
GameObjectinitializeLocation in interface GameObjectinitializeLocation in class AbstractGameObject