Skip to content

InteractTrait

const InteractTrait: Trait<{ near: boolean; onInteract: () => (() => void) | null; prompt: string; radius: number; }>

Defined in: packages/engine/src/gameplay/behaviours/traits.ts:38

near while the hero is within radius. The prompt and the callback only change what this client shows, so the callback may live on the trait; null where nothing listens.