mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Minor note added
This commit is contained in:
@@ -70,6 +70,7 @@ The rules of execution for scripts and functions is as follows:
|
|||||||
|
|
||||||
The following functions, which are defined within the node scripts, are invoked at specific times within the game loop. Note that if you want code to execute *during* node creation, place it within the script's root scope. Variables that you want to persist between calls should also be placed in the script's root.
|
The following functions, which are defined within the node scripts, are invoked at specific times within the game loop. Note that if you want code to execute *during* node creation, place it within the script's root scope. Variables that you want to persist between calls should also be placed in the script's root.
|
||||||
|
|
||||||
|
* `onLoad(node: opaque)`
|
||||||
* `onInit(node: opaque)`
|
* `onInit(node: opaque)`
|
||||||
* `onStep(node: opaque)`
|
* `onStep(node: opaque)`
|
||||||
* `onFree(node: opaque)`
|
* `onFree(node: opaque)`
|
||||||
@@ -83,6 +84,8 @@ The following functions, which are defined within the node scripts, are invoked
|
|||||||
|
|
||||||
These may change or expand as more input devices are added, and the engine matures.
|
These may change or expand as more input devices are added, and the engine matures.
|
||||||
|
|
||||||
|
NOTE: `onLoad()` is invoke every time a node is added to the node tree - but `onInit()` is only invoked once by the engine. After that single invocation, `initNode()` must be called manually on any node children that are loaded later.
|
||||||
|
|
||||||
# Engine Libraries
|
# Engine Libraries
|
||||||
|
|
||||||
A series of libraries are provided to allow Toy to interface and control the engine. In addition, the libraries stored within Toy's `repl/` directory are also available (see the main page for the list).
|
A series of libraries are provided to allow Toy to interface and control the engine. In addition, the libraries stored within Toy's `repl/` directory are also available (see the main page for the list).
|
||||||
|
|||||||
Reference in New Issue
Block a user