Separate from TilemapLayer after custom callbacks.

This commit is contained in:
Andrew Ivins 2014-06-09 14:28:14 +08:00
parent cfadaf3e70
commit ccd914620d

View file

@ -668,13 +668,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++;
@ -684,7 +683,10 @@ Phaser.Physics.Arcade.prototype = {
}
}
}
else
}
else
{
if (this.separateTile(i, sprite.body, this._mapData[i]))
{
this._total++;