What it does
globals.makeDestructible creates a Destructible in globals. It takes id and config. id and config are optional.
Signature
makeDestructible(id?, config?)Arguments
idoptionalconfigoptional
Example · generated
function start() { makeDestructible('destructible', {});}globals.makeDestructible is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.