useHealth
useHealth(
entity): {current:number;maximum:number; } |undefined
Defined in: packages/engine/src/components/useHealth.ts:9
An entity’s health, read from the world, or undefined while it has no Health behaviour: the caller picks whether that hides a bar or reads full.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
entity |
Entity | null |
Returns
Section titled “Returns”{ current: number; maximum: number; } | undefined