public class Crabmeat extends Unit
| Modifier and Type | Field and Description |
|---|---|
Animation |
curAnimation
The current animation of the Crabmeat
|
java.awt.image.BufferedImage |
default_image
Stores the default image
|
static java.lang.String |
DEFAULT_IMAGE_FILENAME
The filename of the default image if animations are turned off
|
| Constructor and Description |
|---|
Crabmeat()
The default constructor
|
Crabmeat(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 Crabmeat
|
| Modifier and Type | Method and Description |
|---|---|
void |
interact(GameObject gameObject)
Describes the interaction between the Crabmeat and the object it is interacting with
|
void |
paint(java.awt.Graphics g)
Draws the Crabmeat's hitbox, animation, and default image
|
void |
update()
Updates the animations
|
getBottomContactLine, getBoundary, getCenterHorizontalContactLine, getCenterVerticalContactLine, getContactLine, getLeftContactLine, getRightContactLinechangeXDir, changeYDirpublic static final java.lang.String DEFAULT_IMAGE_FILENAME
public java.awt.image.BufferedImage default_image
public Animation curAnimation
public Crabmeat()
public Crabmeat(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 interact(GameObject gameObject)