Skip to content

Execution

Daniel Báez edited this page Nov 2, 2024 · 4 revisions

All your files inside the project are merged on execution. This provide some advantages like import all automatically. But you have to be aware that the order of the files determines how high they will be within the execution.

Execution order

  • kaplay.js - The KAPLAY configuration and initialization
  • assets.js - Assets loaded
  • utils/ - Utils are executed from top to bottom. They are mean to be used on scenes and objects then.
  • objects/ - Game objects are executed from top to bottom. They are mean to be used on scenes
  • scenes/ - Scenes are executed from top to bottom
  • main.js - The main file where all is avaible, you can use now your initial go, use the assets, etc

Modifying the order

You can modify the order of files inside folders (i.e: Scenes). To modify the order of files, there's up & down arrows on every file inside a folder:

image

Clone this wiki locally