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
|
movePositiondraw, 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 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 GameObjectmoveDirection in class AbstractShippublic void initializeLocation()
initializeLocation in interface GameObjectinitializeLocation in class AbstractShip