What it does
game.destroy takes id. id is optional.
The API says: defaults to self
Signature
game.destroy(id?)Arguments
idoptional
Example · generated
function start() { game.destroy('main');}game.destroy 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.