mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Skip intersects check by argument
This commit is contained in:
parent
992af0b15e
commit
d80e4f5824
1 changed files with 4 additions and 2 deletions
|
@ -1341,12 +1341,14 @@ var World = new Class({
|
|||
* @param {ArcadePhysicsCallback} [processCallback] - The process callback.
|
||||
* @param {*} [callbackContext] - The context in which to invoke the callback.
|
||||
* @param {boolean} [overlapOnly] - If this a collide or overlap check?
|
||||
* @param {boolean} [intersects] - Assert that the bodies intersect and should not be tested before separation.
|
||||
*
|
||||
* @return {boolean} True if separation occurred, otherwise false.
|
||||
*/
|
||||
separate: function (body1, body2, processCallback, callbackContext, overlapOnly)
|
||||
separate: function (body1, body2, processCallback, callbackContext, overlapOnly, intersects)
|
||||
{
|
||||
if (
|
||||
!intersects &&
|
||||
!body1.enable ||
|
||||
!body2.enable ||
|
||||
body1.checkCollision.none ||
|
||||
|
@ -1983,7 +1985,7 @@ var World = new Class({
|
|||
continue;
|
||||
}
|
||||
|
||||
if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))
|
||||
if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly, true))
|
||||
{
|
||||
if (collideCallback)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue