Interface DamageableEntity

All Superinterfaces:
Entity
All Known Implementing Classes:
HostileOrganism, ResourceDropOffPoint, SquadMember, Turret

public interface DamageableEntity extends Entity
An Entity that has health points and can be damaged and killed.
  • Method Details

    • getHealthPoints

      int getHealthPoints()
    • setHealthPoints

      void setHealthPoints(int healthPoints)
    • isAlive

      boolean isAlive()
      Returns:
      true if health points are above zero
    • applyDamage

      void applyDamage(int damage)
      Reduces health points by damage, clamped to zero.
      Parameters:
      damage - the amount of HP to remove