Interface IAttackable

All Known Implementing Classes:
Animal, Entity, Ghost, Player, Slime, Zombie

public interface IAttackable
The interface for entity that is able to attack.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the attack value of the entity.
    int
    Gets the current health value of the entity.
    int
    Gets the max health value of the entity.
    void
    Inflicts damage on the given target.
    void
    setAttackValue(int value)
    Set the attack value of the entity to the given value.
    void
    setHealthValue(int value)
    Set the current health value of the entity to the given value.
    void
    setMaxHealthValue(int value)
    Set the max health value of the entity to the given value.
  • Method Details

    • inflictDamage

      void inflictDamage(Entity target)
      Inflicts damage on the given target.
      Parameters:
      target - the given target
    • setAttackValue

      void setAttackValue(int value)
      Set the attack value of the entity to the given value.
      Parameters:
      value - the given value
    • getAttackValue

      int getAttackValue()
      Gets the attack value of the entity.
      Returns:
      the attack value of the entity
    • setHealthValue

      void setHealthValue(int value)
      Set the current health value of the entity to the given value.
      Parameters:
      value - the given value
    • getHealthValue

      int getHealthValue()
      Gets the current health value of the entity.
      Returns:
      the current health value of the entity
    • setMaxHealthValue

      void setMaxHealthValue(int value)
      Set the max health value of the entity to the given value.
      Parameters:
      value - the given value
    • getMaxHealthValue

      int getMaxHealthValue()
      Gets the max health value of the entity.
      Returns:
      the max health value of the entity