Class EnemyReachTarget

java.lang.Object
com.prineside.tdi2.events.StoppableEvent
com.prineside.tdi2.events.game.EnemyReachTarget
All Implemented Interfaces:
Event

public final class EnemyReachTarget extends StoppableEvent
Enemy has reached its target (in most of the cases, the Base). To make sure it is a Base an enemy has reached, check the current tile the enemy is on. (B) Triggered by EnemySystem before it has decided to despawn an enemy. Note: there are 2 damage values - one (float) is a starting / raw value and the other (int) is the fact damage that will be given to the Base (the last one has to be modified) Note: actual damage to the base is handled by one of the listeners of this event. If cancelled, enemy won't be despawned, will be placed at the end of its path and will continue to be updated. If not cancelled, the enemy will be despawned and unregistered.
  • Constructor Details

    • EnemyReachTarget

      public EnemyReachTarget(Enemy enemy, float baseDamage, int factDamage)
  • Method Details

    • getEnemy

      public Enemy getEnemy()
    • setEnemy

      public void setEnemy(Enemy enemy)
    • getBaseDamage

      public float getBaseDamage()
    • setBaseDamage

      public EnemyReachTarget setBaseDamage(float baseDamage)
    • getFactDamage

      public int getFactDamage()
    • setFactDamage

      public EnemyReachTarget setFactDamage(int factDamage)
    • isCancelled

      public boolean isCancelled()
    • setCancelled

      public void setCancelled(boolean cancelled)