Files
Airport/assets/scripts/children_test.toy

28 lines
489 B
Plaintext

import node;
//looks like a polyfill
fn loadChild(parent: opaque, fname: string) {
var child: opaque = loadNode(fname);
parent.pushNode(child);
return child;
}
fn onLoad(node: opaque) {
for (var i = 0; i < 20; i++) {
node.loadChild("scripts:/empty.toy");
}
node.freeChildNode(10);
var n = node.getChildNode(10);
for (var i = 0; i < 20; i++) {
node.loadChild("scripts:/empty.toy");
}
print node.getChildNodeCount();
var m = node.getChildNode(10);
print n;
print m;
}