Interface ActiveEntities

All Superinterfaces:
Entities
All Known Subinterfaces:
Plant, Zombie
All Known Implementing Classes:
PlantImpl, ZombieImpl

public interface ActiveEntities extends Entities
This interface models the methods for Zombies and Plants.
  • 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.