Phaser API Documentation

  Version: 
setPosition(x, [y])

Description:

Sets the position of the Rectangle.

Parameters:

name type arguments Default description
x number

The X coordinate of the top left corner of the Rectangle.

y number <optional> x

The Y coordinate of the top left corner of the Rectangle.

Returns:
Description:

This Rectangle object.

Since: 3.0.0