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, moveDirectiondraw, 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, setYVelocityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, 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, setYVelocitypublic 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()
ShootertimeToShoot in interface Shooterpublic void movePosition()
movePosition in interface GameObjectmovePosition in class AbstractShip