changed a few things, preparing tiles

This commit is contained in:
Svipal 2020-03-14 10:23:13 +01:00
parent a7d4816564
commit 66e99bccc6

View file

@ -88,8 +88,8 @@ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)
? Math.floor((worldY / (tileHeight / 2))) ? Math.floor((worldY / (tileHeight / 2)))
: (worldY / (tileHeight / 2)); : (worldY / (tileHeight / 2));
point.x = snapToFloor point.x = snapToFloor
? Math.floor((worldX / tileWidth) - (point.y % 2)) ? Math.floor((worldX / tileWidth) + (point.y % 2))
: (worldX / tileWidth) - (point.y % 2); : (worldX / tileWidth) + (point.y % 2);
} }
} }