public class CharacterData
extends java.lang.Object
Constructor and Description |
---|
CharacterData(Character character) |
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Returns the character's action.
|
Attack |
getAttack()
Returns the attack data that the character is using.
|
int |
getBottom()
Returns the character's hit box's most-bottom y-coordinate.
|
int |
getEnergy()
Returns the character's energy.
|
int |
getHp()
Returns the character's hit points.
|
int |
getLeft()
Returns the character's hit box's most-left x-coordinate.
|
int |
getRemainingFrame()
Returns the number of frames that the character needs to resume to its normal status.
|
int |
getRight()
Returns the character's hit box's most-right x-coordinate.
|
int |
getSpeedX()
Returns the character's horizontal speed.
|
int |
getSpeedY()
Returns the character's vertical speed.
|
State |
getState()
Returns the character's state: stand / crouch / in air / down.
|
int |
getTop()
Returns the character's hit box's most-top y-coordinate.
|
int |
getX()
Returns the character's most-left x-coordinate.
|
int |
getY()
Returns the character box's most-top y-coordinate.
|
boolean |
isControl()
Returns the flag whether this character can run a motion with the motion's command.
|
boolean |
isFront()
Returns the character's facing direction.
|
void |
setAction(Action action)
Sets the character's action.
|
void |
setAttack(Attack attack)
Sets the attack data that the character is using.
|
void |
setBottom(int bottom)
Sets the character's hit box's most-bottom y-coordinate.
|
void |
setControl(boolean control)
Sets the flag whether this character can run a motion with the motion's command
|
void |
setEnergy(int energy)
Sets the character's energy.
|
void |
setFront(boolean front)
Sets the character's facing direction.
|
void |
setHp(int hp)
Sets the character's hit points.
|
void |
setLeft(int left)
Sets the character's hit box's most-left x-coordinate.
|
void |
setRemainingFrame(int remainingFrame)
Sets the number of frames that the character needs to resume to its normal status.
|
void |
setRight(int right)
Sets the character's hit box's most-right x-coordinate.
|
void |
setSpeedX(int speedX)
Sets the character's horizontal speed.
|
void |
setSpeedY(int speedY)
Sets the character's vertical speed.
|
void |
setState(State state)
Sets the character's state: stand / crouch / in air / down.
|
void |
setTop(int top)
Sets the character's hit box's most-top y-coordinate.
|
void |
setX(int x)
Sets the character box's most-left x-coordinate.
|
void |
setY(int y)
Sets the character box's most-top y-coordinate.
|
public CharacterData(Character character)
public Action getAction()
public Attack getAttack()
public int getBottom()
public int getEnergy()
public int getHp()
public int getLeft()
public int getRemainingFrame()
public int getRight()
public int getSpeedX()
public int getSpeedY()
public State getState()
public int getTop()
public int getX()
public int getY()
public boolean isControl()
public boolean isFront()
public void setAction(Action action)
action
- The character's actionpublic void setAttack(Attack attack)
attack
- The attack data that the character is usingpublic void setBottom(int bottom)
bottom
- The character's hit box's most-bottom y-coordinatepublic void setControl(boolean control)
control
- The flag whether this character can run a motion with the motion's commandpublic void setEnergy(int energy)
energy
- The character's energypublic void setFront(boolean front)
front
- The character's facing directionpublic void setHp(int hp)
hp
- The character's hit pointspublic void setLeft(int left)
left
- The character's hit box's most-left x-coordinatepublic void setRemainingFrame(int remainingFrame)
remainingFrame
- The number of frames that the character needs to resume to its normal statuspublic void setRight(int right)
right
- The character's hit box's most-right x-coordinatepublic void setSpeedX(int speedX)
speedX
- The character's horizontal speedpublic void setSpeedY(int speedY)
speedY
- The character's vertical speedpublic void setState(State state)
state
- The character's state: stand / crouch / in air / downpublic void setTop(int top)
top
- The character's hit box's most-top y-coordinatepublic void setX(int x)
x
- The character box's x-coordinatepublic void setY(int y)
y
- The character box's y-coordinate