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, setYVelocitypublic 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 GameObjectinitializeLocation in class AbstractGameObjectpublic void movePosition()
movePosition in interface GameObjectmovePosition in class AbstractGameObjectpublic void moveDirection()
moveDirection in interface GameObjectmoveDirection in class AbstractGameObject