Packagecom.pblabs.components.basic
Classpublic class HealthEvent
InheritanceHealthEvent Inheritance flash.events.Event

Event fired by the HealthComponent on the entity when health changes.



Public Properties
 PropertyDefined By
  amount : Number
Current health amount, after the delta.
HealthEvent
  DAMAGED : String = HealthDamaged
[static]
HealthEvent
  delta : Number
Change in health.
HealthEvent
  DIED : String = HealthDead
[static]
HealthEvent
  HEALED : String = HealthHealed
[static]
HealthEvent
  originatingEntity : IEntity
Entity which caused this damage (or healing), if any.
HealthEvent
  RESURRECTED : String = HealthResurrected
[static]
HealthEvent
Public Methods
 MethodDefined By
  
HealthEvent(type:String, deltaAmt:Number, amountAmt:Number, originator:IEntity, bubbles:Boolean = false, cancelable:Boolean = false)
HealthEvent
  
isDead():Boolean
HealthEvent
Property Detail
amountproperty
public var amount:Number

Current health amount, after the delta. The health property on the component is not updated until after the event is processed.

DAMAGEDproperty 
public static var DAMAGED:String = HealthDamaged

deltaproperty 
public var delta:Number

Change in health.

DIEDproperty 
public static var DIED:String = HealthDead

HEALEDproperty 
public static var HEALED:String = HealthHealed

originatingEntityproperty 
public var originatingEntity:IEntity

Entity which caused this damage (or healing), if any.

RESURRECTEDproperty 
public static var RESURRECTED:String = HealthResurrected

Constructor Detail
HealthEvent()Constructor
public function HealthEvent(type:String, deltaAmt:Number, amountAmt:Number, originator:IEntity, bubbles:Boolean = false, cancelable:Boolean = false)



Parameters
type:String
 
deltaAmt:Number
 
amountAmt:Number
 
originator:IEntity
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
Method Detail
isDead()method
public function isDead():Boolean

Returns
Boolean