Phaser API Documentation

  Version: 
setTo(x, y, width, height)

Description:

Sets the position, width, and height of the Rectangle.

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.

height number

The height of the Rectangle.

Returns:
Description:

This Rectangle object.

Since: 3.0.0