Rectangle#setTo()

setTo(x, y, width, height) → {Phaser.Rectangle}

Sets the members of Rectangle to the specified values.

Parameters
Name Type Description
x number

The x coordinate of the top-left corner of the Rectangle.

y number

The y coordinate of the top-left corner of the Rectangle.

width number

The width of the Rectangle. Should always be either zero or a positive value.

height number

The height of the Rectangle. Should always be either zero or a positive value.

Returns

This Rectangle object

Source code: geom/Rectangle.js (Line 83)
doc_phaser
2017-02-14 11:07:04
Comments
Leave a Comment

Please login to continue.