Skip to content

Commit 386ee19

Browse files
committed
Merge pull request phaserjs#544 from videlais/1.2
Tilemap.swap() called twice should not flip values
2 parents a07cf89 + 3b7039a commit 386ee19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tilemap/Tilemap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ Phaser.Tilemap.prototype = {
11141114
/**
11151115
* Scans the given area for tiles with an index matching tileA and swaps them with tileB.
11161116
*
1117-
* @method Phaser.Tilemap#swapTile
1117+
* @method Phaser.Tilemap#swap
11181118
* @param {number} tileA - First tile index.
11191119
* @param {number} tileB - Second tile index.
11201120
* @param {number} x - X position of the top left of the area to operate one, given in tiles, not pixels.
@@ -1157,7 +1157,7 @@ Phaser.Tilemap.prototype = {
11571157
{
11581158
this._results[index].index = this._tempB;
11591159
}
1160-
else if (value.index === this._tempB)
1160+
if (value.index === this._tempB)
11611161
{
11621162
this._results[index].index = this._tempA;
11631163
}

0 commit comments

Comments
 (0)