Phaser API Documentation

  Version: 

Member of: Phaser.Types.Input

HitAreaCallback(hitArea, x, y, gameObject)

Parameters:

name type description
hitArea any

The hit area object.

x number

The translated x coordinate of the hit test event.

y number

The translated y coordinate of the hit test event.

gameObject Phaser.GameObjects.GameObject

The Game Object that invoked the hit test.

Type:
function
Returns:
Description:

true if the coordinates fall within the space of the hitArea, otherwise false.

Type:
  • boolean
Since: 3.0.0