public class HitArea
extends java.lang.Object
Constructor and Description |
---|
HitArea() |
HitArea(int L,
int R,
int T,
int B) |
Modifier and Type | Method and Description |
---|---|
int |
getB()
Returns the y-coordinate of the character's hit box's bottom boundary.
|
int |
getL()
Returns the x-coordinate of the character's hit box's left boundary.
|
int |
getR()
Returns the x-coordinate of the character's hit box's right boundary.
|
int |
getT()
Returns the y-coordinate of the character's hit box's top boundary.
|
void |
move(int speedX,
int speedY)
This method receives speedX and speedY.
|
void |
setParameters(HitArea hit)
This method receives hit and sets all of its parameters.
|
public void setParameters(HitArea hit)
hit
- data structure of this character's hit boxpublic void move(int speedX, int speedY)
speedX
- the speed of the x-coordinatespeedY
- the speed of the y-coordinatepublic int getL()
public int getR()
public int getT()
public int getB()