Replaced polyfills with real implementations

This commit is contained in:
2023-07-30 18:11:19 +10:00
parent a20cfdd13e
commit ad0539be68
9 changed files with 34 additions and 95 deletions

View File

@@ -26,7 +26,7 @@ var direction: int = null; //BUGFIX: animation not looping properly
var attackPositionX: int = null;
var attackPositionY: int = null;
//polyfills - animating different cycles on one image
//animating different cycles on one image
var walkAnimationCounter: int = 0;
var attackAnimationCounter: int = 0;
@@ -272,14 +272,3 @@ fn faceDirection(node: opaque, dir: int) {
node.setNodeFrames(4);
walkAnimationCounter = 12;
}
//polyfills - move these to standard
fn normalize(x): int {
if (x > 0) {
return 1;
}
if (x < 0) {
return -1;
}
return 0;
}