public class Attack
extends java.lang.Object
Type | Property and Description |
---|---|
boolean |
isDown
Returns the flag whether this skill can push down the opponent when hit.
|
Constructor and Description |
---|
Attack() |
Attack(Attack attack) |
Attack(HitArea hitAreaInput,
int speedXInput,
int speedYInput,
int invokeInput,
int intervalInput,
int repeatInput,
int activeInput,
int hitDamegeInput,
int guardDamageInput,
int startAddEnergyInput,
int hitAddEnergyInput,
int guardAddEnergyInput,
int giveEnergyInput,
int impactXInput,
int impactYInput,
int giveGuardRecovInput,
int knockBackInput,
int hitStopInput,
int attackTypeInput,
boolean downPropInput,
render.Image imageInput) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkProjectile()
Checks whether this attack is a projectile or not.
|
int |
getActive()
Returns the number of frames in Active.
|
int |
getAttackType()
Returns the value of the attack type:
1 = high,
2 = middle,
3 = low,
4 = throw,
|
int |
getGiveEnergy()
Returns the value of the energy added to the opponent when it is hit by this skill.
|
int |
getGiveGuardRecov()
Returns the number of frames that the guarded opponent needs to resume to its normal status after being hit by this skill.
|
int |
getGuardAddEnergy()
Returns the value of the energy added to the character when this skill is blocked by the opponent.
|
int |
getGuardDamage()
Returns the damage value to the guarded opponent hit by this skill.
|
int |
getHitAddEnergy()
Returns the value of the energy added to the character when this skill hits the opponent.
|
HitArea |
getHitAreaNow()
Returns HitArea's information of this attack hit box in the current frame.
|
HitArea |
getHitAreaSetting()
Returns HitArea's setting information.
|
int |
getHitDamage()
Returns the damage value to the unguarded opponent hit by this skill.
|
int |
getHitStop()
Not in use!
|
render.Image |
getImage()
Returns this attack's imageHandle.
|
int |
getImpactX()
Returns the change in the horizontal speed of the opponent when it is hit by this skill.
|
int |
getImpactY()
Returns the change in the vertical speed of the opponent when it is hit by this skill.
|
int |
getInterval()
Not in use!
|
int |
getKnockBack()
Not in use!
|
int |
getNowFrame()
Returns the number of frames since this attack was used.
|
int |
getRepeat()
Not in use!
|
int |
getSettingSpeedX()
Returns the absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character).
|
int |
getSettingSpeedY()
Returns the absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character).
|
int |
getSpeedX()
Returns the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
|
int |
getSpeedY()
Returns the vertical speed of the attack hit box (minus when moving up and plus when moving down).
|
int |
getStartAddEnergy()
Returns the value of the energy added to the character when it uses this skill.
|
int |
getStartUp()
Returns the number of frames in Startup.
|
boolean |
isDownProperty()
Returns the flag whether this skill can push down the opponent when hit.
|
boolean |
isPlayerNumber()
Returns the player side's flag.
|
void |
materialise(boolean playerNum,
int characterX,
int characterY,
int characterSize,
boolean characterDirection)
This method receives the player side's flag, player's position and player's direction.
|
void |
setActive(int active)
Sets the number of frames in Active.
|
void |
setAttackType(int attackType)
Sets the value of the attack type:
1 = high,
2 = middle,
3 = low,
4 = throw,
|
void |
setDownProperty(boolean downProperty)
Sets the flag whether this skill can push down the opponent when hit.
|
void |
setGiveEnergy(int giveEnergy)
Sets the value of the energy added to the opponent when it is hit by this skill.
|
void |
setGiveGuardRecov(int giveGuardRecov)
Sets the number of frames that the guarded opponent needs to resume to his normal status after being hit by this skill.
|
void |
setGuardAddEnergy(int guardAddEnergy)
Sets the value of the energy added to the character when this skill is blocked by the opponent.
|
void |
setGuardDamage(int guardDamage)
Sets the damage value to the guarded opponent hit by this skill.
|
void |
setHitAddEnergy(int hitAddEnergy)
Sets the value of the energy added to the character when this skill hits the opponent.
|
void |
setHitAreaNow(HitArea hitAreaNow)
Sets HitArea's information of this attack hit box in the current frame.
|
void |
setHitAreaSetting(HitArea hitAreaSetting)
Sets HitArea's setting information.
|
void |
setHitDamage(int hitDamage)
Sets the damage value to the unguarded opponent hit by this skill.
|
void |
setHitStop(int hitStop)
Not in use!
|
void |
setImage(render.Image image)
Sets this attack's imageHandle.
|
void |
setImpactX(int impactX)
Sets the change in the horizontal speed of the opponent when it is hit by this skill.
|
void |
setImpactY(int impactY)
Sets the change in the vertical speed of the opponent when it is hit by this skill.
|
void |
setInterval(int interval)
Not in use!
|
void |
setKnockBack(int knockBack)
Not in use!
|
void |
setNowFrame(int nowFrame)
Sets the number of frames since this attack was used.
|
void |
setPlayerNumber(boolean playerNumber)
Sets the player side's flag.
|
void |
setRepeat(int repeat)
Not in use!
|
void |
setSettingSpeedX(int settingSpeedX)
Sets the absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character).
|
void |
setSettingSpeedY(int settingSpeedY)
Sets the absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character).
|
void |
setSpeedX(int speed_x)
Sets the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
|
void |
setSpeedY(int speed_y)
Sets the vertical speed of the attack hit box (minus when moving up and plus when moving down).
|
void |
setStartAddEnergy(int startAddEnergy)
Sets the value of energy added to the character when it uses this skill.
|
void |
setStartUp(int startUp)
Sets the number of frames in Startup.
|
boolean |
update()
Updates the image and location per frame for the projectile.
|
boolean |
update(Character character)
Updates the image and location per frame.
|
boolean |
update(ReplayCharacterData character)
Updates the image and location per frame for ReplayData.
|
public Attack()
public Attack(Attack attack)
public Attack(HitArea hitAreaInput, int speedXInput, int speedYInput, int invokeInput, int intervalInput, int repeatInput, int activeInput, int hitDamegeInput, int guardDamageInput, int startAddEnergyInput, int hitAddEnergyInput, int guardAddEnergyInput, int giveEnergyInput, int impactXInput, int impactYInput, int giveGuardRecovInput, int knockBackInput, int hitStopInput, int attackTypeInput, boolean downPropInput, render.Image imageInput)
public boolean checkProjectile()
public int getActive()
public int getAttackType()
public int getGiveEnergy()
public int getGiveGuardRecov()
public int getGuardAddEnergy()
public int getGuardDamage()
public int getHitAddEnergy()
public HitArea getHitAreaNow()
public HitArea getHitAreaSetting()
public int getHitDamage()
public int getHitStop()
public render.Image getImage()
public int getImpactX()
public int getImpactY()
public int getInterval()
public int getKnockBack()
public int getNowFrame()
public int getRepeat()
public int getSettingSpeedX()
public int getSettingSpeedY()
public int getSpeedX()
public int getSpeedY()
public int getStartAddEnergy()
public int getStartUp()
public boolean isDownProperty()
public boolean isPlayerNumber()
public void materialise(boolean playerNum, int characterX, int characterY, int characterSize, boolean characterDirection)
PlayerNum
- The player side's flagCharacterX
- The player's position of the x-coordinateCharacterY
- The player's position of the y-coordinateCharacterDirection
- The player's directionpublic void setActive(int active)
active
- The number of frames in Activepublic void setAttackType(int attackType)
attackType
- The value of the attack typepublic void setDownProperty(boolean downProperty)
downProperty
- The flag whether this skill can push down the opponent when hitpublic void setGiveEnergy(int giveEnergy)
giveEnergy
- The value of the energy added to the opponent when it is hit by this skillpublic void setGiveGuardRecov(int giveGuardRecov)
giveGuardRecov
- The number of frames that the guarded opponent needs to resume to his normal status after being hit by this skillpublic void setGuardAddEnergy(int guardAddEnergy)
guardAddEnergy
- The value of the energy added to the character when this skill is blocked by the opponentpublic void setGuardDamage(int guardDamage)
guardDamage
- The damage value to the guarded opponent hit by this skillpublic void setHitAddEnergy(int hitAddEnergy)
hitAddEnergy
- The value of the energy added to the character when this skill hits the opponentpublic void setHitAreaNow(HitArea hitAreaNow)
hitAreaNow
- HitArea's information of this attack hit box in the current framepublic void setHitAreaSetting(HitArea hitAreaSetting)
hitAreaSetting
- HitArea's setting informationpublic void setHitDamage(int hitDamage)
hitDamage
- The damage value to the unguarded opponent hit by this skillpublic void setHitStop(int hitStop)
hitStop
- Not in use!public void setImage(render.Image image)
This
- attack's imageHandlepublic void setImpactX(int impactX)
impactX
- The change in the horizontal speed of the opponent when it is hit by this skillpublic void setImpactY(int impactY)
impactY
- The change in the vertical speed of the opponent when it is hit by this skillpublic void setInterval(int interval)
interval
- Not in use!public void setKnockBack(int knockBack)
knockBack
- Not in use!public void setNowFrame(int nowFrame)
nowFrame
- The number of frames since this attack was usedpublic void setPlayerNumber(boolean playerNumber)
playerNumber
- The player side's flagpublic void setRepeat(int repeat)
repeat
- Not in use!public void setSettingSpeedX(int settingSpeedX)
settingSpeedX
- The absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character)public void setSettingSpeedY(int settingSpeedY)
settingSpeedY
- The absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character)public void setSpeedX(int speed_x)
speed_x
- The horizontal speed of the attack hit box (minus when moving left and plus when moving right)public void setSpeedY(int speed_y)
speed_y
- The vertical speed of the attack hit box (minus when moving up and plus when moving down)public void setStartAddEnergy(int startAddEnergy)
startAddEnergy
- The value of the energy added to the character when it uses this skillpublic void setStartUp(int startUp)
startUp
- The number of frames in Startuppublic boolean update()
public boolean update(Character character)
character
- The character using this attackpublic boolean update(ReplayCharacterData character)
character
- The character using this attack