public abstract class AbstractEnemyShip extends AbstractShip
panel
Constructor and Description |
---|
AbstractEnemyShip(int healthPoints,
java.lang.String imageLocation,
AbstractGameObject target,
java.awt.geom.Point2D.Double location)
This constructor takes HP, sprite location, target, and position
|
Modifier and Type | Method and Description |
---|---|
void |
initializeLocation()
This method sets the initial location of the ship to the passed location by the constructor, allowing random location generation.
|
void |
moveDirection()
This method makes it so the ship always points toward its target's center
|
movePosition
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 AbstractEnemyShip(int healthPoints, java.lang.String imageLocation, AbstractGameObject target, java.awt.geom.Point2D.Double location)
healthPoints
- Ship HPimageLocation
- sprite locationtarget
- the target of this shiplocation
- the positions this ship starts atpublic void moveDirection()
moveDirection
in interface GameObject
moveDirection
in class AbstractShip
public void initializeLocation()
initializeLocation
in interface GameObject
initializeLocation
in class AbstractShip