mirror of
https://github.com/wassname/phaser.git
synced 2026-08-12 12:20:38 +08:00
Merge pull request #393 from brejep/master
Tilemap#paste diffX and diffY equations changed
This commit is contained in:
@@ -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
|
// 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 diffX = x - tileblock[1].x;
|
||||||
var diffY = tileblock[1].y - y;
|
var diffY = y - tileblock[1].y;
|
||||||
|
|
||||||
for (var i = 1; i < tileblock.length; i++)
|
for (var i = 1; i < tileblock.length; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>QUnit Example</title>
|
||||||
|
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="qunit"></div>
|
||||||
|
<div id="qunit-fixture"></div>
|
||||||
|
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
|
||||||
|
<script>
|
||||||
|
var Phaser = {};
|
||||||
|
</script>
|
||||||
|
<script src="../src/tilemap/Tilemap.js"></script>
|
||||||
|
<script src="../src/tilemap/TilemapParser.js"></script>
|
||||||
|
<script src="../src/tilemap/Tileset.js"></script>
|
||||||
|
<script src="../src/tilemap/Tile.js"></script>
|
||||||
|
<script src="../test/tilemap/Tilemap.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user