Phaser API Documentation

  Version: 
contains(x, y)

Description:

Checks if the given point is inside the Rectangle's bounds.

Parameters:

name type description
x number

The X coordinate of the point to check.

y number

The Y coordinate of the point to check.

Returns:
Description:

true if the point is within the Rectangle's bounds, otherwise false.

Type:
  • boolean
Since: 3.0.0