Added epoch to scripts.

This commit is contained in:
2021-09-25 18:59:12 -07:00
parent 4bf7d14416
commit 631c3a78b1
5 changed files with 68 additions and 3 deletions

View File

@ -12,13 +12,16 @@ bool sandboxSceneInit(sandboxscene_t *game) {
scripterInit(&game->scripter, &game->engine);
game->scripter.user = game;
// Add APIs
scriptsApiIo(&game->scripter);
scriptsApiDisplay(&game->scripter);
scriptsApiAsset(&game->scripter);
scriptsApiEpoch(&game->scripter);
// Load main script
assetScripterAppend(&game->scripter, "scripts/main.js");
// Invoke initialization.
scripterInvokeMethodSimple(&game->scripter, "init");
return true;