Interface DamageDealingEntity
- All Superinterfaces:
Entity
- All Known Implementing Classes:
HostileOrganism, SquadMember, Turret
An
Entity that can attack a DamageableEntity within range.-
Method Summary
Modifier and TypeMethodDescriptionvoidattack(DamageableEntity target) Attackstarget, applying this entity's attack damage to it.intintMethods inherited from interface Entity
getColonyId, getId, getLocation, setColonyId, setId, setLocation
-
Method Details
-
calcAttackDamage
int calcAttackDamage()- Returns:
- the damage dealt per attack
-
calcMaxAttackRange
int calcMaxAttackRange()- Returns:
- the maximum Chebyshev distance at which this entity can attack a target
-
attack
Attackstarget, applying this entity's attack damage to it.- Parameters:
target- the entity to attack; expected to be withincalcMaxAttackRange()
-