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

@@ -76,8 +76,8 @@ fn onDraw(node: opaque) {
//draw to the screen
node.drawNode(
floor((i * TILE_PIXEL_WIDTH + posX) * scaleX),
floor((j * TILE_PIXEL_HEIGHT + posY) * scaleY),
floor((i * TILE_PIXEL_WIDTH + posX) * scaleX) + globalCameraX,
floor((j * TILE_PIXEL_HEIGHT + posY) * scaleY) + globalCameraY,
floor(TILE_PIXEL_WIDTH * scaleX),
floor(TILE_PIXEL_HEIGHT * scaleY)
);