Phaser API Documentation

  Version: 
<static> Equals(rect, toCompare)

Description:

Compares the x, y, width and height properties of two rectangles.

Parameters:

name type description
rect Phaser.Geom.Rectangle

Rectangle A

toCompare Phaser.Geom.Rectangle

Rectangle B

Returns:
Description:

true if the rectangles' properties are an exact match, otherwise false.

Type:
  • boolean
Since: 3.0.0