com.springrts.ai.event
Class UnitDamagedAIEvent

java.lang.Object
  extended by Structure
      extended by com.springrts.ai.AIEvent
          extended by com.springrts.ai.event.UnitDamagedAIEvent

public final class UnitDamagedAIEvent
extends AIEvent

This AI event is sent when a unit was damaged. It contains the attacked unit, the attacking unit, the ammount of damage and the direction from where the damage was inflickted. In case of a laser weapon, the direction will point directly from the attacker to the attacked unit, while with artillery it will rather be from somewhere up in the sky to the attacked unit. See also the unit-destroyed event. attacker may be 0, which means no attacker was directly involved. If paralyzer is true, then damage is paralyzation damage, otherwise it is real damage.


Field Summary
 int attacker
           
 float damage
           
 AIFloat3 dir
           
 boolean paralyzer
           
static int TOPIC
           
 int unit
           
 int weaponDefId
           
 
Constructor Summary
UnitDamagedAIEvent(Pointer memory)
           
 
Method Summary
 int getTopic()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOPIC

public static final int TOPIC
See Also:
Constant Field Values

unit

public int unit

attacker

public int attacker

damage

public float damage

dir

public AIFloat3 dir

weaponDefId

public int weaponDefId

paralyzer

public boolean paralyzer
Constructor Detail

UnitDamagedAIEvent

public UnitDamagedAIEvent(Pointer memory)
Method Detail

getTopic

public int getTopic()
Specified by:
getTopic in class AIEvent