public class Buzzbomber extends Unit
| Modifier and Type | Field and Description |
|---|---|
Animation |
curAnimation
The current animation of the Buzzbomber
|
java.awt.image.BufferedImage |
default_image
Stores the default image
|
static java.lang.String |
DEFAULT_IMAGE_FILENAME
The filename of default image of the Buzzbomber when animations are turned off
|
static int |
FIRE_DELAY
The delay for the Buzzbomber to stay in the firing animation
|
static double |
FIRE_H
The height of the Buzzbomber when it's firing
|
static double |
FIRE_W
The width of the Buzzbomber when it's firing
|
int |
fireDelay
Stores the delay for the firing animation
|
boolean |
firedOnce
Identifies if the Buzzbomber has already fired once
|
boolean |
firing
Identifies if the Buzzbomber is firing
|
ImageManager |
imageManager
Stores all of the sprite animations
|
static double |
MAX_X_RANGE
The max x range the Buzzbomber can travel from its original x position
|
double |
maxXRange
Stores the max x range the Buzzbomber can travel from its original x position
|
double |
originalH
Stores the original height of the Buzzbomber when it's flying
|
double |
originalW
Stores the original width of the Buzzbomber when it's flying
|
double |
originalX
Stores the original x coordinate of the Buzzbomber when it spawns
|
static double |
X_SPEED
The constant x speed of the Buzzbomber
|
| Constructor and Description |
|---|
Buzzbomber()
The default constructor
|
Buzzbomber(double x,
double y,
int xDir,
int yDir,
double xSpeed,
double ySpeed,
double w,
double h,
ImageManager imageManager)
The general constructor used to create the Buzzbomber
|
| Modifier and Type | Method and Description |
|---|---|
void |
interact(GameObject gameObject)
Describes the interaction between the Buzzbomber and the object it is interacting with
|
void |
paint(java.awt.Graphics g)
Draws the Buzzbomber's hitbox, animation, and default image
|
void |
update()
Updates the Buzzbomber's animation and movements
|
void |
updateX()
Updates the Buzzbomber's x movements
|
getBottomContactLine, getBoundary, getCenterHorizontalContactLine, getCenterVerticalContactLine, getContactLine, getLeftContactLine, getRightContactLinechangeXDir, changeYDirpublic static final double MAX_X_RANGE
public static final double X_SPEED
public static final double FIRE_W
public static final double FIRE_H
public static final int FIRE_DELAY
public static final java.lang.String DEFAULT_IMAGE_FILENAME
public java.awt.image.BufferedImage default_image
public Animation curAnimation
public double maxXRange
public double originalX
public double originalW
public double originalH
public int fireDelay
public boolean firing
public boolean firedOnce
public ImageManager imageManager
public Buzzbomber()
public Buzzbomber(double x,
double y,
int xDir,
int yDir,
double xSpeed,
double ySpeed,
double w,
double h,
ImageManager imageManager)
x - The spawning x coordiantey - The spawning y coordinatexDir - The spawning xDiryDir - The spawning yDirxSpeed - The spawning xSpeedySpeed - the Spawning ySpeedw - The spawning widthh - The spawning heightimageManager - A hashmap containing all of the sprite animationspublic void paint(java.awt.Graphics g)
public void update()
public void interact(GameObject gameObject)
public void updateX()