public class ShooterEnemyShip extends AbstractEnemyShip implements Shooter
Modifier and Type | Field and Description |
---|---|
static long |
coolDownTime |
static int |
healthPoints |
static java.lang.String |
imageLocation |
panel
Constructor and Description |
---|
ShooterEnemyShip(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
|
ShooterEnemyShip(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 is empty.
|
void |
shoot()
This method is responisble for firing bullets.
|
boolean |
timeToShoot()
This method checks if it's time for the shooter to shoot or if it's still cooling down.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw, getCenter, getDirection, getHealthPoints, getHeight, getImage, getPosition, getWidth, getXCenter, getXDirection, getXPosition, getXVelocity, getYCenter, getYDirection, getYPosition, getYVelocity, gotHit, initializeLocation, isDead, makeDead, move, moveDirection, setDirection, setDirectionToward, setHealthPoints, setImage, setImageLocation, setPosition, setXDirection, setXPosition, setXVelocity, setYDirection, setYPosition, setYVelocity
public static int healthPoints
public static java.lang.String imageLocation
public static long coolDownTime
public ShooterEnemyShip(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 ShooterEnemyShip(AbstractGameObject target, java.awt.geom.Point2D.Double location)
target
- the target of this shiplocation
- the positions this ship starts atpublic void shoot()
public boolean timeToShoot()
Shooter
timeToShoot
in interface Shooter
public void movePosition()
movePosition
in interface GameObject
movePosition
in class AbstractShip