Package struct

Class AttackData

java.lang.Object
struct.AttackData

public class AttackData extends Object
The class dealing with data on the attack such as damage amount and required energy amount.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    The number of frames in Active.
    private int
    The value of the attack type: 1 = high, 2 = middle, 3 = low, 4 = throw.
    private int
    The number of frames since this attack was used.
    private HitArea
    The HitArea's information of this attack hit box in the current frame.
    private boolean
    The flag whether this skill can push down the opponent when hit.
    true if this skill can push down, false otherwise.
    private int
    The value of the energy added to the opponent when it is hit by this skill.
    private int
    The number of frames that the guarded opponent needs to resume to his normal status after being hit by this skill.
    private int
    The value of the energy added to the character when this skill is blocked by the opponent.
    private int
    The damage value to the guarded opponent hit by this skill.
    private int
    The value of the energy added to the character when this skill hits the opponent.
    private int
    The damage value to the unguarded opponent hit by this skill.
    private int
    The change in the horizontal speed of the opponent when it is hit by this skill.
    private int
    The change in the vertical speed of the opponent when it is hit by this skill.
    private boolean
    The flag whether this skill is projectile or not.
    true if this skill is projectile, false otherwise.
    private boolean
    The player side's flag.
    True if the character is P1, or false if P2.
    private HitArea
    TheHitArea's information of this attack hit box set in Motion.csv.
    private int
    The absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character).
    private int
    The absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character).
    private int
    The horizontal speed of the attack hit box (minus when moving left and plus when moving right).
    private int
    The vertical speed of the attack hit box (minus when moving up and plus when moving down).
    private int
    The value of the energy added to the character when it uses this skill.
    private int
    The number of frames in Startup.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of frames in Active.
    int
    Returns the value of the attack type: 1 = high, 2 = middle, 3 = low, 4 = throw.
    int
    Returns the number of frames since this attack was used.
    Returns HitArea's information of this attack hit box in the current frame.
    int
    Returns the value of the energy added to the opponent when it is hit by this skill.
    int
    Returns the number of frames that the guarded opponent needs to resume to its normal status after being hit by this skill.
    int
    Returns the value of the energy added to the character when this skill is blocked by the opponent.
    int
    Returns the damage value to the guarded opponent hit by this skill.
    int
    Returns the value of the energy added to the character when this skill hits the opponent.
    int
    Returns the damage value to the unguarded opponent hit by this skill.
    int
    Returns the change in the horizontal speed of the opponent when it is hit by this skill.
    int
    Returns the change in the vertical speed of the opponent when it is hit by this skill.
    int
    Returns the integer number indicating the player of the attack.
    Returns HitArea's setting information.
    int
    Returns the absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character).
    int
    Returns the absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character).
    int
    Returns the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
    int
    Returns the vertical speed of the attack hit box (minus when moving up and plus when moving down).
    int
    Returns the value of the energy added to the character when it uses this skill.
    int
    Returns the number of frames in Startup.
    boolean
    Returns the flag whether this skill can push down the opponent when hit.
    boolean
    Returns the player side's flag.
    boolean
    Returns the flag whether this skill is projectile or not.
    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
    setCurrentFrame(int nowFrame)
    Sets the number of frames since this attack was used.
    void
    setDownProp(boolean downProp)
    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
    setHitDamage(int hitDamage)
    Sets the damage value to the unguarded opponent hit by this skill.
    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
    setIsProjectile(boolean isProjectile)
    Sets the boolean value whether this skill is projectile or not.
    void
    setPlayerNumber(boolean playerNumber)
    Sets the player side's flag.
    void
    setSettingHitArea(HitArea settingHitArea)
    Sets HitArea's setting information.
    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 speedX)
    Sets the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
    void
    setSpeedY(int speedY)
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • settingHitArea

      private HitArea settingHitArea
      TheHitArea's information of this attack hit box set in Motion.csv.
      See Also:
    • settingSpeedX

      private int settingSpeedX
      The absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character).
    • settingSpeedY

      private int settingSpeedY
      The absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character).
    • currentHitArea

      private HitArea currentHitArea
      The HitArea's information of this attack hit box in the current frame.
      See Also:
    • currentFrame

      private int currentFrame
      The number of frames since this attack was used.
    • playerNumber

      private boolean playerNumber
      The player side's flag.
      True if the character is P1, or false if P2.
    • speedX

      private int speedX
      The horizontal speed of the attack hit box (minus when moving left and plus when moving right).
    • speedY

      private int speedY
      The vertical speed of the attack hit box (minus when moving up and plus when moving down).
    • startUp

      private int startUp
      The number of frames in Startup.
    • active

      private int active
      The number of frames in Active.
    • hitDamage

      private int hitDamage
      The damage value to the unguarded opponent hit by this skill.
    • guardDamage

      private int guardDamage
      The damage value to the guarded opponent hit by this skill.
    • startAddEnergy

      private int startAddEnergy
      The value of the energy added to the character when it uses this skill.
    • hitAddEnergy

      private int hitAddEnergy
      The value of the energy added to the character when this skill hits the opponent.
    • guardAddEnergy

      private int guardAddEnergy
      The value of the energy added to the character when this skill is blocked by the opponent.
    • giveEnergy

      private int giveEnergy
      The value of the energy added to the opponent when it is hit by this skill.
    • impactX

      private int impactX
      The change in the horizontal speed of the opponent when it is hit by this skill.
    • impactY

      private int impactY
      The change in the vertical speed of the opponent when it is hit by this skill.
    • giveGuardRecov

      private int giveGuardRecov
      The number of frames that the guarded opponent needs to resume to his normal status after being hit by this skill.
    • attackType

      private int attackType
      The value of the attack type: 1 = high, 2 = middle, 3 = low, 4 = throw.
    • downProp

      private boolean downProp
      The flag whether this skill can push down the opponent when hit.
      true if this skill can push down, false otherwise.
    • isProjectile

      private boolean isProjectile
      The flag whether this skill is projectile or not.
      true if this skill is projectile, false otherwise.
  • Method Details

    • isPlayerNumber

      public boolean isPlayerNumber()
      Returns the player side's flag.
      Returns:
      true if the player is P1, or false if P2
    • isDownProp

      public boolean isDownProp()
      Returns the flag whether this skill can push down the opponent when hit.
      Returns:
      true if this skill can push down, false otherwise.
    • isProjectile

      public boolean isProjectile()
      Returns the flag whether this skill is projectile or not.
      Returns:
      true if this skill is projectile, false otherwise
    • getCurrentFrame

      public int getCurrentFrame()
      Returns the number of frames since this attack was used.
      Returns:
      the number of frames since this attack was used
    • getPlayerNumber

      public int getPlayerNumber()
      Returns the integer number indicating the player of the attack.
      Returns:
      0 if the player is P1, or 1 if P2
    • getSpeedX

      public int getSpeedX()
      Returns the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
      Returns:
      the horizontal speed of the attack hit box (minus when moving left and plus when moving right)
    • getSpeedY

      public int getSpeedY()
      Returns the vertical speed of the attack hit box (minus when moving up and plus when moving down).
      Returns:
      the vertical speed of the attack hit box (minus when moving up and plus when moving down)
    • getStartUp

      public int getStartUp()
      Returns the number of frames in Startup.
      Returns:
      the number of frames in Startup
    • getActive

      public int getActive()
      Returns the number of frames in Active.
      Returns:
      the number of frames in Active
    • getHitDamage

      public int getHitDamage()
      Returns the damage value to the unguarded opponent hit by this skill.
      Returns:
      the damage value to the unguarded opponent hit by this skill
    • getGuardDamage

      public int getGuardDamage()
      Returns the damage value to the guarded opponent hit by this skill.
      Returns:
      the damage value to the guarded opponent hit by this skill
    • getStartAddEnergy

      public int getStartAddEnergy()
      Returns the value of the energy added to the character when it uses this skill.
      Returns:
      the value of the energy added to the character when it uses this skill
    • getHitAddEnergy

      public int getHitAddEnergy()
      Returns the value of the energy added to the character when this skill hits the opponent.
      Returns:
      the value of the energy added to the character when this skill hits the opponent
    • getGuardAddEnergy

      public int getGuardAddEnergy()
      Returns the value of the energy added to the character when this skill is blocked by the opponent.
      Returns:
      the value of the energy added to the character when this skill is blocked by the opponent
    • getGiveEnergy

      public int getGiveEnergy()
      Returns the value of the energy added to the opponent when it is hit by this skill.
      Returns:
      the value of the energy added to the opponent when it is hit by this skill
    • getImpactX

      public int getImpactX()
      Returns the change in the horizontal speed of the opponent when it is hit by this skill.
      Returns:
      the change in the horizontal speed of the opponent when it is hit by this skill
    • getImpactY

      public int getImpactY()
      Returns the change in the vertical speed of the opponent when it is hit by this skill.
      Returns:
      the change in the vertical speed of the opponent when it is hit by this skill
    • getGiveGuardRecov

      public int getGiveGuardRecov()
      Returns the number of frames that the guarded opponent needs to resume to its normal status after being hit by this skill.
      Returns:
      the number of frames that the guarded opponent needs to resume to its normal status after being hit by this skill
    • getAttackType

      public int getAttackType()
      Returns the value of the attack type: 1 = high, 2 = middle, 3 = low, 4 = throw.
      Returns:
      the value of the attack type
    • getCurrentHitArea

      public HitArea getCurrentHitArea()
      Returns HitArea's information of this attack hit box in the current frame.
      Returns:
      HitArea's information of this attack hit box in the current frame
      See Also:
    • getSettingSpeedX

      public 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).
      Returns:
      the absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character)
    • getSettingSpeedY

      public 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).
      Returns:
      the absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character)
    • getSettingHitArea

      public HitArea getSettingHitArea()
      Returns HitArea's setting information.
      Returns:
      HitArea's setting information
    • setSettingHitArea

      public void setSettingHitArea(HitArea settingHitArea)
      Sets HitArea's setting information.
      Parameters:
      settingHitArea - HitArea's setting information
    • setSettingSpeedX

      public 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).
      Parameters:
      settingSpeedX - the absolute value of the horizontal speed of the attack hit box (zero means the attack hit box will track the character)
    • setSettingSpeedY

      public 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).
      Parameters:
      settingSpeedY - the absolute value of the vertical speed of the attack hit box (zero means the attack hit box will track the character)
    • setCurrentFrame

      public void setCurrentFrame(int nowFrame)
      Sets the number of frames since this attack was used.
      Parameters:
      nowFrame - the number of frames since this attack was used
    • setPlayerNumber

      public void setPlayerNumber(boolean playerNumber)
      Sets the player side's flag.
      Parameters:
      playerNumber - the player side's flag. true if the player is P1, or false if P2.
    • setSpeedX

      public void setSpeedX(int speedX)
      Sets the horizontal speed of the attack hit box (minus when moving left and plus when moving right).
      Parameters:
      speedX - the horizontal speed of the attack hit box (minus when moving left and plus when moving right)
    • setSpeedY

      public void setSpeedY(int speedY)
      Sets the vertical speed of the attack hit box (minus when moving up and plus when moving down).
      Parameters:
      speedY - the vertical speed of the attack hit box (minus when moving up and plus when moving down)
    • setStartUp

      public void setStartUp(int startUp)
      Sets the number of frames in Startup.
      Parameters:
      startUp - the number of frames in Startup
    • setActive

      public void setActive(int active)
      Sets the number of frames in Active.
      Parameters:
      active - the number of frames in Active
    • setHitDamage

      public void setHitDamage(int hitDamage)
      Sets the damage value to the unguarded opponent hit by this skill.
      Parameters:
      hitDamage - the damage value to the unguarded opponent hit by this skill
    • setGuardDamage

      public void setGuardDamage(int guardDamage)
      Sets the damage value to the guarded opponent hit by this skill.
      Parameters:
      guardDamage - the damage value to the guarded opponent hit by this skill
    • setStartAddEnergy

      public void setStartAddEnergy(int startAddEnergy)
      Sets the value of energy added to the character when it uses this skill.
      Parameters:
      startAddEnergy - the value of the energy added to the character when it uses this skill
    • setHitAddEnergy

      public void setHitAddEnergy(int hitAddEnergy)
      Sets the value of the energy added to the character when this skill hits the opponent.
      Parameters:
      hitAddEnergy - the value of the energy added to the character when this skill hits the opponent
    • setGuardAddEnergy

      public void setGuardAddEnergy(int guardAddEnergy)
      Sets the value of the energy added to the character when this skill is blocked by the opponent.
      Parameters:
      guardAddEnergy - the value of the energy added to the character when this skill is blocked by the opponent
    • setGiveEnergy

      public void setGiveEnergy(int giveEnergy)
      Sets the value of the energy added to the opponent when it is hit by this skill.
      Parameters:
      giveEnergy - the value of the energy added to the opponent when it is hit by this skill
    • setImpactX

      public void setImpactX(int impactX)
      Sets the change in the horizontal speed of the opponent when it is hit by this skill.
      Parameters:
      impactX - the change in the horizontal speed of the opponent when it is hit by this skill
    • setImpactY

      public void setImpactY(int impactY)
      Sets the change in the vertical speed of the opponent when it is hit by this skill.
      Parameters:
      impactY - the change in the vertical speed of the opponent when it is hit by this skill
    • setGiveGuardRecov

      public 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.
      Parameters:
      giveGuardRecov - the number of frames that the guarded opponent needs to resume to his normal status after being hit by this skill
    • setAttackType

      public void setAttackType(int attackType)
      Sets the value of the attack type: 1 = high, 2 = middle, 3 = low, 4 = throw.
      Parameters:
      attackType - the value of the attack type
    • setDownProp

      public void setDownProp(boolean downProp)
      Sets the flag whether this skill can push down the opponent when hit.
      Parameters:
      downProp - the flag whether this skill can push down the opponent when hit. true if this skill can push down, false otherwise.
    • setIsProjectile

      public void setIsProjectile(boolean isProjectile)
      Sets the boolean value whether this skill is projectile or not.
      Parameters:
      isProjectile - the flag whether this skill is projectile or not. true if this skill is projectile, false otherwise.