Phaser API Documentation

  Version: 
<private> collideHandler(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)

Description:

Internal helper function. Please use Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap instead.

Parameters:

name type description
object1 Phaser.Types.Physics.Arcade.ArcadeColliderType

The first object or array of objects to check.

object2 Phaser.Types.Physics.Arcade.ArcadeColliderType

The second object or array of objects to check, or undefined.

collideCallback ArcadePhysicsCallback

An optional callback function that is called if the objects collide.

processCallback ArcadePhysicsCallback

An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then collideCallback will only be called if this callback returns true.

callbackContext any

The context in which to run the callbacks.

overlapOnly boolean

Whether this is a collision or overlap check.

Returns:
Description:

True if any objects overlap (with overlapOnly); or true if any overlapping objects were separated.

Type:
  • boolean
Since: 3.0.0