Moves the top-left corner of a Rectangle so that its center is at the given coordinates.
name | type | description |
---|---|---|
rect | Phaser.Geom.Rectangle |
The Rectangle to be centered. |
x | number |
The X coordinate of the Rectangle's center. |
y | number |
The Y coordinate of the Rectangle's center. |
The centered rectangle.