Rectangle#centerOn()

centerOn(x, y) → {Phaser.Rectangle}

Centers this Rectangle so that the center coordinates match the given x and y values.

Parameters
Name Type Description
x number

The x coordinate to place the center of the Rectangle at.

y number

The y coordinate to place the center of the Rectangle at.

Returns

This Rectangle object

Source code: geom/Rectangle.js (Line 122)
doc_phaser
2017-02-14 11:06:51
Comments
Leave a Comment

Please login to continue.