Added onUpdate(node: opaque, delta: int) to nodes

This commit is contained in:
2023-06-30 08:27:28 +10:00
parent 5aa92fd696
commit e32a561e07
5 changed files with 17 additions and 1 deletions

2
Box

Submodule Box updated: ac7dd38bdb...dcbb2d12f2

View File

@@ -18,6 +18,10 @@ fn onInit(node: opaque) {
node.loadNodeTexture("airport:/little_plane.png"); node.loadNodeTexture("airport:/little_plane.png");
} }
// fn onUpdate(node: opaque, delta: int) {
// //
// }
// fn onStep(node: opaque) { // fn onStep(node: opaque) {
// // // //
// } // }

View File

@@ -73,6 +73,10 @@ fn onLoad(node: opaque) {
node.setNodeScaleY(CAMERA_SCALE_Y); node.setNodeScaleY(CAMERA_SCALE_Y);
} }
//fn onUpdate(node: opaque, delta: int) {
// //
//}
fn onStep(node: opaque) { fn onStep(node: opaque) {
if (++walkAnimationCounter >= 12) { if (++walkAnimationCounter >= 12) {
node.incrementCurrentNodeFrame(); node.incrementCurrentNodeFrame();

View File

@@ -73,6 +73,10 @@ fn onLoad(node: opaque) {
node.setNodeScaleY(CAMERA_SCALE_Y); node.setNodeScaleY(CAMERA_SCALE_Y);
} }
//fn onUpdate(node: opaque, delta: int) {
// //
//}
fn onStep(node: opaque) { fn onStep(node: opaque) {
//initial freeze //initial freeze
if (enableMovementCounter > 0) { if (enableMovementCounter > 0) {

View File

@@ -36,6 +36,10 @@ fn onFree(node: opaque) {
} }
} }
//fn onUpdate(node: opaque, delta: int) {
// //
//}
//fn onStep(node: opaque) { //fn onStep(node: opaque) {
// // // //
//} //}