public class Bullet extends AbstractGameObject
Modifier and Type | Field and Description |
---|---|
static int |
healthPoints |
static java.lang.String |
imageLocation |
static double |
xVelocity |
static double |
yVelocity |
panel
Constructor and Description |
---|
Bullet(Shooter shooter)
The constructor only takes a shooter
|
Modifier and Type | Method and Description |
---|---|
Shooter |
getShooter()
This method returns the shooter to custody
|
void |
initializeLocation()
This method sets location on the center of the shooter.
|
void |
moveDirection()
This method overrides moveDirection() as to not do anything.
|
void |
movePosition()
Moves the position of the bullet by increasing its position with the fixed velocity.
|
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 double xVelocity
public static double yVelocity
public static java.lang.String imageLocation
public static int healthPoints
public Bullet(Shooter shooter)
shooter
- the shooter of this bulletpublic Shooter getShooter()
public void initializeLocation()
initializeLocation
in interface GameObject
initializeLocation
in class AbstractGameObject
public void movePosition()
movePosition
in interface GameObject
movePosition
in class AbstractGameObject
public void moveDirection()
moveDirection
in interface GameObject
moveDirection
in class AbstractGameObject