lifecycle.main

Section: Lifecycle

What it does

main is a lifecycle function: you write it in your script and the engine calls it. The engine calls it: console-game entry (async OK). It receives no arguments.

The API says: console-game entry (async OK)

Signature

main()

Arguments

It takes none.

Example · generated

function main() {  ui.createText('hud', 'Ready', { x: 20, y: 20 });}

main is not called, it is written. The engine calls it: console-game entry (async OK). The body shown here is an example of what goes in it.

7 members in lifecycle