public class CharacterData
extends java.lang.Object
Constructor and Description |
---|
CharacterData(fighting.Character character)
The class constructor that acquires information on the character from an
instance of the Character class passed as the argument and newly creates
an instance of the CharacterData class.
|
CharacterData(CharacterData characterData)
The copy constructor that creates a copy of an instance of the
CharacterData class passed as the argument.
|
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Returns the character's action.
|
AttackData |
getAttack()
Returns the attack data that the character is using.
|
int |
getBottom()
Returns the character's hit box's most-bottom y-coordinate.
|
int |
getCenterX()
Returns the character's hit box's center x-coordinate.
|
int |
getCenterY()
Returns the character's hit box's center y-coordinate.
|
int |
getEnergy()
Returns the character's energy.
|
int |
getGraphicAdjustX()
Returns the amount of movement in the horizontal direction used to adjust
the x coordinate when determining the direction of the character.
|
int |
getGraphicSizeX()
Returns the character's graphic width.
|
int |
getGraphicSizeY()
Returns the character's graphic height.
|
int |
getHitCount()
Returns the continuous hit count of attacks used by this character.
|
int |
getHp()
Returns the character's HP.
|
java.util.Deque<Key> |
getInputCommand()
Deprecated.
This method is used only for processing of the simulator. You
should not use this method for AI development.
|
int |
getLastHitFrame()
Returns the frame number of the last frame that an attack used by this
character hit the opponent.
|
int |
getLeft()
Returns the character's hit box's most-left x-coordinate.
|
java.util.Deque<Key> |
getProcessedCommand()
Deprecated.
This method is used only for processing of the simulator. You
should not use this method for AI development.
|
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/ AIR / DOWN.
|
int |
getTop()
Returns the character's hit box's most-top y-coordinate.
|
int |
getX()
Deprecated.
Use
getLeft() or getRight() or
getCenterX() instead |
int |
getY()
Deprecated.
Use
getTop() or getBottom() or
getCenterY() instead |
boolean |
isControl()
Returns the flag whether this character can run a new motion with the
motion's command.
|
boolean |
isFront()
Returns the character's facing direction.
|
boolean |
isHitConfirm()
Returns the flag whether the motion hits the opponent or not.
|
boolean |
isPlayerNumber()
Returns the character's side flag.
|
void |
setAction(Action action)
Sets the character's action.
|
void |
setAttack(AttackData attack)
Sets the character's attack.
|
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 new 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 |
setHitConfirm(boolean hitConfirm)
Sets a boolean value whether the motion hits the opponent or not.
|
void |
setHitCount(int hitCount)
Sets the continuous hit count of attacks used by this character.
|
void |
setHp(int hp)
Sets the character's HP.
|
void |
setInputCommand(java.util.Deque<Key> inputCommand)
Deprecated.
This method is used only for processing of the simulator. You
should not use this method for AI development.
|
void |
setLastHitFrame(int lastHitFrame)
Sets the frame number of the last frame that an attack used by this
character hit the opponent.
|
void |
setLeft(int left)
Sets the character's hit box's most-left x-coordinate
|
void |
setProcessedCommand(java.util.Deque<Key> inputCommand)
Deprecated.
This method is used only for processing of the simulator. You
should not use this method for AI development.
|
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.
|
void |
setTop(int top)
Sets the character's hit box's most-top y-coordinate
|
void |
setX(int x)
Sets the character's horizontal position.
|
void |
setY(int y)
Sets the character's vertical position.
|
public CharacterData(fighting.Character character)
character
- an instance of Character classpublic CharacterData(CharacterData characterData)
characterData
- an instance of CharacterData classpublic boolean isPlayerNumber()
true
if the character is P1, or false
if P2public boolean isFront()
true
if the character is facing right, false
otherwisepublic boolean isControl()
true
if the character can run, false
otherwisepublic int getHp()
public int getEnergy()
public int getX()
getLeft()
or getRight()
or
getCenterX()
insteadpublic int getY()
getTop()
or getBottom()
or
getCenterY()
insteadpublic int getLeft()
public int getRight()
public int getTop()
public int getBottom()
public int getCenterX()
public int getCenterY()
public int getSpeedX()
public int getSpeedY()
public State getState()
State
public Action getAction()
Action
public int getRemainingFrame()
public AttackData getAttack()
AttackData
public int getGraphicSizeX()
public int getGraphicSizeY()
public int getGraphicAdjustX()
public boolean isHitConfirm()
true
if the motion hits the opponent, false
otherwisepublic int getHitCount()
public int getLastHitFrame()
public java.util.Deque<Key> getInputCommand()
public java.util.Deque<Key> getProcessedCommand()
public void setHp(int hp)
hp
- the amount of HPpublic void setEnergy(int energy)
energy
- the amount of energypublic void setX(int x)
x
- the character's horizontal positionpublic void setY(int y)
y
- the character's vertical positionpublic 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
- a given stateState
public void setAction(Action action)
action
- a given actionAction
public void setFront(boolean front)
front
- the character's facing direction. true
if the
character is facing right, false
otherwise.public void setControl(boolean control)
control
- the flag whether this character can run a new motion with the
motion's command. true
if the character can run,
false
otherwise.public void setRemainingFrame(int remainingFrame)
remainingFrame
- the number of frames that the character needs to resume to its
normal status you want to setpublic void setTop(int top)
top
- the integer value you want to setpublic void setBottom(int bottom)
bottom
- the integer value you want to setpublic void setLeft(int left)
left
- the character's hit box's most-left x-coordinate you want to
setpublic void setRight(int right)
right
- the character's hit box's most-right x-coordinate you want to
setpublic void setAttack(AttackData attack)
attack
- the attack you want to setAttackData
public void setHitCount(int hitCount)
hitCount
- the continuous hit count of attacks used by this characterpublic void setLastHitFrame(int lastHitFrame)
lastHitFrame
- the frame number of the last frame that an attack used by this
character hit the opponentpublic void setHitConfirm(boolean hitConfirm)
hitConfirm
- a boolean value whether the motion hits the opponent or not.
true
if the motion hits the opponent, false
otherwise.public void setInputCommand(java.util.Deque<Key> inputCommand)
inputCommand
- a list storing keys of the action that the character will be
executing in the simulatorpublic void setProcessedCommand(java.util.Deque<Key> inputCommand)
inputCommand
- a list storing up to 30 keys that the character executed in
the simulator