Fixed global bug

This commit is contained in:
2023-07-05 01:31:09 +10:00
parent 8476935208
commit 77cd869ffc
4 changed files with 51 additions and 72 deletions

View File

@@ -4,8 +4,8 @@ import node;
//lifecycle functions
fn onLoad(node: opaque) {
node.setNodeScaleX(CAMERA_SCALE_X);
node.setNodeScaleY(CAMERA_SCALE_Y);
// node.setNodeScaleX(CAMERA_SCALE_X);
// node.setNodeScaleY(CAMERA_SCALE_Y);
}
fn onDraw(node: opaque) {
@@ -20,8 +20,8 @@ fn onDraw(node: opaque) {
var height: int const = node.getNodeRectH();
node.drawNode(
floor(posX * scaleX) + globalCameraX,
floor(posY * scaleY) + globalCameraY,
floor(posX * scaleX),
floor(posY * scaleY),
floor(width * scaleX),
floor(height * scaleY)
);