Skip to content

Commit

Permalink
Merge pull request #891 from aivins/issue890
Browse files Browse the repository at this point in the history
Separate from TilemapLayer after custom callbacks.
  • Loading branch information
photonstorm committed Jun 10, 2014
2 parents f433f20 + ccd9146 commit 1370014
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/physics/arcade/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,13 +670,12 @@ Phaser.Physics.Arcade.prototype = {
}

for (var i = 0; i < this._mapData.length; i++)
{
if (this.separateTile(i, sprite.body, this._mapData[i]))
{
if (processCallback)
{
// They collided, is there a custom process callback?
if (processCallback)
if (processCallback.call(callbackContext, sprite, this._mapData[i]))
{
if (processCallback.call(callbackContext, sprite, this._mapData[i]))
if (this.separateTile(i, sprite.body, this._mapData[i]))
{
this._total++;

Expand All @@ -686,7 +685,10 @@ Phaser.Physics.Arcade.prototype = {
}
}
}
else
}
else
{
if (this.separateTile(i, sprite.body, this._mapData[i]))
{
this._total++;

Expand Down

0 comments on commit 1370014

Please sign in to comment.