HealthComponent - acrimi/Raven GitHub Wiki
HealthComponent
stores the entity's health points. When the current hp
value reaches zero, the entity's DeathComponent will be activated if present.
Configuration
When used inside the components
block, the initial state of the component can be configured with the following parameters:
Key | Type | Description |
---|---|---|
maxHp | int | The maximum amount of hp this entity can have. Defaults to 1 . |
initialHp | int | The entity's initial hp value, bounded by maxHp . Defaults to the value of maxHp . |
Example:
"HealthComponent": {
"maxHp": 150,
"initialHp": 100
}
Properties
This component has no exposed properties