Package com.prineside.tdi2.events.game
Class EnemyReachTarget
java.lang.Object
com.prineside.tdi2.events.StoppableEvent
com.prineside.tdi2.events.game.EnemyReachTarget
- All Implemented Interfaces:
Event
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getEnemy()
int
boolean
reset()
setBaseDamage
(float baseDamage) void
setCancelled
(boolean cancelled) void
setFactDamage
(int factDamage) Methods inherited from class com.prineside.tdi2.events.StoppableEvent
isStopped, stop
-
Constructor Details
-
EnemyReachTarget
public EnemyReachTarget()
-
-
Method Details
-
setup
-
reset
-
getEnemy
-
setEnemy
-
getBaseDamage
public float getBaseDamage() -
setBaseDamage
-
getFactDamage
public int getFactDamage() -
setFactDamage
-
isCancelled
public boolean isCancelled() -
setCancelled
public void setCancelled(boolean cancelled)
-