public class FollowerEnemyShip extends AbstractEnemyShip
Modifier and Type | Field and Description |
---|---|
static int |
healthPoints |
static java.lang.String |
imageLocation |
static double |
xVelocity |
static double |
yVelocity |
panel
Constructor and Description |
---|
FollowerEnemyShip(AbstractGameObject target,
java.awt.geom.Point2D.Double location)
This is the same constructor but it sets HP and sprite location to the static variables of those values
|
FollowerEnemyShip(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 |
movePosition()
This method makes this ship changes position toward its target, following it
|
initializeLocation, moveDirection
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 static int healthPoints
public static java.lang.String imageLocation
public static double xVelocity
public static double yVelocity
public FollowerEnemyShip(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 FollowerEnemyShip(AbstractGameObject target, java.awt.geom.Point2D.Double location)
target
- the target of this shiplocation
- the positions this ship starts atpublic void movePosition()
movePosition
in interface GameObject
movePosition
in class AbstractShip