2023-08-22 07:29:53 -05:00
|
|
|
# Yugine Scripting Guide
|
|
|
|
|
2023-10-17 12:22:06 -05:00
|
|
|
Script hooks exist to allow to modification of the game.
|
|
|
|
|
2023-10-29 16:39:45 -05:00
|
|
|
|config.js|called before any game play, including play from editor|
|
2023-10-17 12:22:06 -05:00
|
|
|
|game.js|called to start the game|
|
|
|
|
|editorconfig.js|called when the editor is loaded, used to personalize|
|
2023-11-16 09:27:04 -06:00
|
|
|
|predbg.js|called when play in editor is selected, before level load|
|
|
|
|
|debug.js|called when play in editor is selected, after level load|
|
2023-10-29 16:39:45 -05:00
|
|
|
|dbgret.js|called when play in editor returns to editor|
|
2023-10-17 12:22:06 -05:00
|
|
|
|
2023-08-22 07:29:53 -05:00
|
|
|
All objects in the Yugine can have an associated script. This script can perform setup, teardown, and handles responses for the object.
|
|
|
|
|
|
|
|
|function|description|
|
|
|
|
|---|---|
|
|
|
|
|start|called when the object is loaded|
|
2023-10-17 12:22:06 -05:00
|
|
|
|update(dt)|called once per game frame tick|
|
2023-08-22 07:29:53 -05:00
|
|
|
|physupdate(dt)|called once per physics tick|
|
2023-11-16 09:27:04 -06:00
|
|
|
|stop|called when the object is killed|
|
2023-11-27 14:29:55 -06:00
|
|
|
|debug|use draw functions with the object's world position, during debug pass|
|
|
|
|
|gui|draw functions in screen space, during gameplay gui pass|
|
2023-11-16 09:27:04 -06:00
|
|
|
|draw|draw functions in world space|
|