hp: number
Current health points. Setting it to a lower or higher value will trigger onHurt() and onHeal().
Setting it to a value greater than maxHP will set it to maxHP.
Setting it to a value less than 0 will set it to 0 and trigger onDeath().
onHurt(action: (deltaHP?: number )=>void ): KEventController
Register an event that runs when the hp is lowered.
sincev2000.1
onHeal(action: (deltaHP?: number )=>void ): KEventController
Register an event that runs when the hp is increased.
sincev2000.1
onDeath(action: ()=>void ): KEventController
Register an event that runs when object's HP becomes zero.
sincev2000.1