Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Pickup

Pickup(props): Element | null

A reward a character a player controls takes as the character’s body comes within radius of its entity, such as a coin. The room adds reward coins to the player’s wallet, emits TakenEvent on the entity and destroys it, so a taken pickup never comes back by itself. targets widens or narrows who may take it. Import it from @spawnite/engine and put it inside an Entity, <Entity position={[0, 0.5, -3]}><Pickup reward={1} /></Entity>; it draws nothing itself, and needs behaviours() in the game’s plugins. Pickup is its guide.

Parameter Type
props PickupProps

Element | null