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, setYVelocity
public AbstractShip(int healthPoints, java.lang.String imageLocation)
healthPoints
- HPimageLocation
- sprite locatoinpublic void movePosition()
movePosition
in interface GameObject
movePosition
in class AbstractGameObject
public abstract void moveDirection()
GameObject
moveDirection
in interface GameObject
moveDirection
in class AbstractGameObject
public abstract void initializeLocation()
GameObject
initializeLocation
in interface GameObject
initializeLocation
in class AbstractGameObject