Tilemap - reverse diffX and diffY equations in Tilemap#paste.

This commit is contained in:
Brett Jephson
2014-02-09 17:37:21 +00:00
parent 16fa37081f
commit b0f4ac3bcc
3 changed files with 78 additions and 2 deletions
+2 -2
View File
@@ -918,8 +918,8 @@ Phaser.Tilemap.prototype = {
}
// Find out the difference between tileblock[1].x/y and x/y and use it as an offset, as it's the top left of the block to paste
var diffX = tileblock[1].x - x;
var diffY = tileblock[1].y - y;
var diffX = x - tileblock[1].x;
var diffY = y - tileblock[1].y;
for (var i = 1; i < tileblock.length; i++)
{