Interface DamageableEntity
- All Superinterfaces:
Entity
- All Known Implementing Classes:
HostileOrganism, ResourceDropOffPoint, SquadMember, Turret
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDamage(int damage) Reduces health points bydamage, clamped to zero.intbooleanisAlive()voidsetHealthPoints(int healthPoints) Methods inherited from interface Entity
getColonyId, getId, getLocation, setColonyId, setId, setLocation
-
Method Details
-
getHealthPoints
int getHealthPoints() -
setHealthPoints
void setHealthPoints(int healthPoints) -
isAlive
boolean isAlive()- Returns:
trueif health points are above zero
-
applyDamage
void applyDamage(int damage) Reduces health points bydamage, clamped to zero.- Parameters:
damage- the amount of HP to remove
-