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 and the boundary of the hit box and the attack hit box are changed according to the received values.
|
void |
setParameters(HitArea hit)
This method receives hit and sets all of its parameters.
|
public int getB()
public int getL()
public int getR()
public int getT()
public void move(int speedX, int speedY)
speedX
- The speed of the x-coordinatespeedY
- The speed of the y-coordinatepublic void setParameters(HitArea hit)
hit
- Data structure of this character's hit box