Basic script-based engine init is working - performance is poor

This commit is contained in:
2022-10-02 13:50:50 +01:00
parent 91afafab22
commit a7e5d101dd
9 changed files with 544 additions and 60 deletions

5
assets/scripts/init.toy Normal file
View File

@@ -0,0 +1,5 @@
import engine;
initWindow("Airport Game", 800, 600, false);
loadRootNode("assets/scripts/root.toy");

14
assets/scripts/root.toy Normal file
View File

@@ -0,0 +1,14 @@
//root node can load the whole scene, and essentially act as the scene object
fn onInit() {
print "root.toy:onInit() called";
}
fn onStep() {
import standard;
print "root.toy:onStep() called";
print clock();
}
fn onFree() {
print "root.toy:onFree() called";
}