Package pvzclone.model.api
Interface ActiveEntities
- All Superinterfaces:
Entities
- All Known Implementing Classes:
PlantImpl
,ZombieImpl
This interface models the methods for Zombies and Plants.
-
Method Summary
Modifier and TypeMethodDescriptionlong
double
long
double
void
receiveDamage
(double damageReceived) This method decreases Health Points.void
setLastTimeAttack
(long lastTimeAttack) Sets the respective field.Methods inherited from interface pvzclone.model.api.Entities
getEntityName, getPosition, isAlive
-
Method Details
-
setLastTimeAttack
void setLastTimeAttack(long lastTimeAttack) Sets the respective field.- Parameters:
lastTimeAttack
- time since the last attack.
-
receiveDamage
void receiveDamage(double damageReceived) This method decreases Health Points.- Parameters:
damageReceived
- Attack Damage that entity has received.
-
getLastTimeAttack
long getLastTimeAttack()- Returns:
- time since the last attack.
-
getDamage
double getDamage()- Returns:
- entity's Attack Damage.
-
getRemainingLife
double getRemainingLife()- Returns:
- entity's Health Points.
-
getCooldown
long getCooldown()- Returns:
- time needed to start and finish an attack.
-