Skip to content

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.

Parameter Type
entity Entity | null

{ current: number; maximum: number; } | undefined