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 HDamegeInput,
int GDamageInput,
int SAddEnergyInput,
int HAddEnergyInput,
int GAddEnergyInput,
int GiveEnergyInput,
int ImpactXInput,
int ImpactYInput,
int GiveGuardRecovInput,
int KnockBackInput,
int HitStopInput,
int AttackTypeInput,
boolean DownPropInput,
org.newdawn.slick.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's 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 takes to resume to his normal status after it is 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!
|
org.newdawn.slick.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.
If this value is negative and your character's energy is less than the absolute value of this value, you can not use 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,
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's 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 takes to resume to his normal status after it is 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(org.newdawn.slick.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.
If this value is negative and your character's energy is less than the absolute value of this value, you can not use 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 HDamegeInput, int GDamageInput, int SAddEnergyInput, int HAddEnergyInput, int GAddEnergyInput, int GiveEnergyInput, int ImpactXInput, int ImpactYInput, int GiveGuardRecovInput, int KnockBackInput, int HitStopInput, int AttackTypeInput, boolean DownPropInput, org.newdawn.slick.Image ImageInput)
public void materialise(boolean PlayerNum, int CharacterX, int CharacterY, 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 boolean checkProjectile()
public boolean update()
public boolean update(Character character)
character
- the character using this attackpublic boolean update(ReplayCharacterData character)
character
- the character using this attackpublic HitArea getHitAreaSetting()
public void setHitAreaSetting(HitArea hitAreaSetting)
hitAreaSetting
- HitArea's setting informationpublic HitArea getHitAreaNow()
public void setHitAreaNow(HitArea hitAreaNow)
hitAreaNow
- HitArea's information of this attack hit box in the current framepublic int getNowFrame()
public void setNowFrame(int nowFrame)
nowFrame
- the number of frames since this attack was usedpublic boolean isPlayerNumber()
public void setPlayerNumber(boolean playerNumber)
playerNumber
- the player side's flagpublic int getSpeedX()
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 int getSpeedY()
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 int getStartUp()
public void setStartUp(int startUp)
startUp
- the number of frames in Startuppublic int getInterval()
public void setInterval(int interval)
interval
- not in use!public int getRepeat()
public void setRepeat(int repeat)
repeat
- not in use!public int getActive()
public void setActive(int active)
active
- the number of frames in Activepublic int getHitDamage()
public void setHitDamage(int hitDamage)
hitDamage
- the damage value to the unguarded opponent hit by this skillpublic int getGuardDamage()
public void setGuardDamage(int guardDamage)
guardDamage
- the damage value to the guarded opponent hit by this skillpublic int getStartAddEnergy()
public void setStartAddEnergy(int startAddEnergy)
startAddEnergy
- the value of the energy added to the character when it uses this skillpublic int getHitAddEnergy()
public void setHitAddEnergy(int hitAddEnergy)
hitAddEnergy
- the value of the energy added to the character when this skill hits the opponentpublic int getGuardAddEnergy()
public void setGuardAddEnergy(int guardAddEnergy)
guardAddEnergy
- the value of the energy added to the character when this skill is blocked by the opponentpublic int getGiveEnergy()
public void setGiveEnergy(int giveEnergy)
giveEnergy
- the value of the energy added to the opponent when it is hit by this skillpublic int getImpactX()
public void setImpactX(int impactX)
impactX
- the change in the horizontal speed of the opponent when it is hit by this skillpublic int getImpactY()
public void setImpactY(int impactY)
impactY
- the change in the vertical speed of the opponent when it is hit by this skillpublic int getGiveGuardRecov()
public void setGiveGuardRecov(int giveGuardRecov)
giveGuardRecov
- the number of frames that the guarded opponent takes to resume to his normal status after it is hit by this skillpublic int getKnockBack()
public void setKnockBack(int knockBack)
knockBack
- not in use!public int getHitStop()
public void setHitStop(int hitStop)
hitStop
- not in use!public int getAttackType()
public void setAttackType(int attackType)
attackType
- the value of the attack's typepublic boolean isDownProperty()
public void setDownProperty(boolean downProperty)
downProperty
- the flag whether this skill can push down the opponent when hitpublic org.newdawn.slick.Image getImage()
public void setImage(org.newdawn.slick.Image image)
this
- attack's imageHandlepublic int getSettingSpeedX()
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 int getSettingSpeedY()
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)