Added sorting layers to nodes

This commit is contained in:
2023-06-29 13:47:35 +10:00
parent 51a0c94ba2
commit 2d6ad5efcc
10 changed files with 39 additions and 44 deletions

View File

@@ -103,8 +103,8 @@ fn onDraw(node: opaque) {
var originOffsetY: int = node.getNodeRectH() * int scaleY / 2;
node.drawNode(
floor(posX * scaleX) - originOffsetX,
floor(posY * scaleY) - originOffsetY,
floor(posX * scaleX) - originOffsetX + globalCameraX,
floor(posY * scaleY) - originOffsetY + globalCameraY,
floor(node.getNodeRectW() * scaleX),
floor(node.getNodeRectH() * scaleY)
);