mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Merge pull request #891 from aivins/issue890
Separate from TilemapLayer after custom callbacks.
This commit is contained in:
commit
13700148fb
1 changed files with 8 additions and 6 deletions
|
@ -670,13 +670,12 @@ Phaser.Physics.Arcade.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < this._mapData.length; i++)
|
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.call(callbackContext, sprite, this._mapData[i]))
|
||||||
if (processCallback)
|
|
||||||
{
|
{
|
||||||
if (processCallback.call(callbackContext, sprite, this._mapData[i]))
|
if (this.separateTile(i, sprite.body, this._mapData[i]))
|
||||||
{
|
{
|
||||||
this._total++;
|
this._total++;
|
||||||
|
|
||||||
|
@ -686,7 +685,10 @@ Phaser.Physics.Arcade.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (this.separateTile(i, sprite.body, this._mapData[i]))
|
||||||
{
|
{
|
||||||
this._total++;
|
this._total++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue