Skip to content

Commit 69b9e5e

Browse files
committed
Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo phaserjs#877 phaserjs#1147)
1 parent 3298909 commit 69b9e5e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Version 2.1.0 - "Cairhien" - -in development-
113113
* Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
114114
* P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
115115
* P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
116+
* Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147)
116117

117118
### Bug Fixes
118119

src/physics/arcade/World.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,12 @@ Phaser.Physics.Arcade.prototype = {
653653
{
654654
if (group1.children[i].exists)
655655
{
656-
if (group1.children[i].type == Phaser.GROUP)
656+
if (group1.children[i].type === Phaser.GROUP)
657657
{
658658
this.collideGroupVsGroup(group1.children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly);
659-
} else {
659+
}
660+
else
661+
{
660662
this.collideSpriteVsGroup(group1.children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly);
661663
}
662664
}

0 commit comments

Comments
 (0)