Component Health - DevRubicate/Devil-Fresh GitHub Wiki

Description

The health component is responsible for managing the hit points of the entity.

Events

setMaxHealth (amount:Int)

setHealth (amount:Int)

damage (amount:Int, source:Entity)

heal (amount:Int, source:Entity)

Details

Taking damage

After taking damage, if the health of the entity ends up being 0 or below, the health component will send the event "die" to it's entity.