Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement scaling for FlxTilemapExt #384

Merged
merged 10 commits into from
Apr 17, 2023
Prev Previous commit
Next Next commit
move comment, add another
  • Loading branch information
Geokureli committed Apr 14, 2023
commit 8d8864e1b1d62cce60990cef5d74cfc3fff92e51
3 changes: 2 additions & 1 deletion flixel/addons/tile/FlxTilemapExt.hx
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@ class FlxTilemapExt extends FlxTilemap
final maxTileX:Int = bindInt(Math.ceil((object.x + object.width - xPos) / scaledTileWidth), 0, widthInTiles);
final maxTileY:Int = bindInt(Math.ceil((object.y + object.height - yPos) / scaledTileHeight), 0, heightInTiles);

// Then loop through this selection of tiles and call FlxObject.separate() accordingly
// Cache tilemap movement
final deltaX:Float = xPos - last.x;
final deltaY:Float = yPos - last.y;

// Then loop through this selection of tiles and call FlxObject.separate() accordingly
for (row in minTileY...maxTileY)
{
for (column in minTileX...maxTileX)
Expand Down