Phaser API Documentation

  Version: 
<static> Contains(rect, x, y)

Description:

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

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle to check.

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