Interface WeaponEntity
-
- All Known Implementing Classes:
AbstractWeaponEntity
public interface WeaponEntity
Weapons implement this interface. This is required for example that AI can control weapons
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abortAttack()
double
calculateBaseDamage()
int
calculateCooldown()
double
calculateMaxDistance()
double
calculateMinDistance()
boolean
canAttack(AbstractCompositeEntity targetComposite, CoordI2 targetEntityPos)
double
getLastAccuracy()
double
getLastDistance()
double
getLastOutput()
boolean
isControlAll()
void
requestAttack(CoordI2 worldPos)
Requests weapon to attackvoid
requestAttack(UUID targetCompositeEntityId, CoordI2 targetEntityPos)
void
setControlAll(boolean all)
-
-
-
Method Detail
-
canAttack
boolean canAttack(AbstractCompositeEntity targetComposite, CoordI2 targetEntityPos)
-
requestAttack
void requestAttack(CoordI2 worldPos)
Requests weapon to attack- Parameters:
worldPos
- World position to attack. There has to be an entity at this position.
-
abortAttack
void abortAttack()
-
isControlAll
boolean isControlAll()
-
setControlAll
void setControlAll(boolean all)
-
calculateBaseDamage
double calculateBaseDamage()
-
calculateMinDistance
double calculateMinDistance()
-
calculateMaxDistance
double calculateMaxDistance()
-
calculateCooldown
int calculateCooldown()
-
getLastOutput
double getLastOutput()
-
getLastDistance
double getLastDistance()
-
getLastAccuracy
double getLastAccuracy()
-
-