Mantra Examples
Loading code from document...
Game Lifecycle

Run code after a collision is active.

after
collisionActive

Game Lifecycle

Run code after a collision ends.

after
collisionEnd

Game Lifecycle

Run code after a collision starts.

after
collisionStart

Game Lifecycle

Run code after an entity is created.

after
createEntity

Game Lifecycle

Run code after an entity is removed.

after
removeEntity

Game Lifecycle

Run code after the update loop.

after
update

Game Lifecycle

Run code after an entity is updated.

after
updateEntity

Game Lifecycle

Run code before a collision is active.

before
collisionActive

Game Lifecycle

Run code before a collision ends.

before
collisionEnd

Game Lifecycle

Run code before a collision starts.

before
collisionStart

Game Lifecycle

Run code before an entity is created.

before
createEntity

Game Lifecycle

Run code before an entity is removed.

before
removeEntity

Game Lifecycle

Run code before the update loop.

before
update

Game Lifecycle

Run code before an entity is updated.

before
updateEntity

$lifecycle game start update render stop pause resume load unload reset restart hook event before after middle