Phaser API Documentation

  Version: 
<static> Offset(rect, x, y)

Description:

Nudges (translates) the top left corner of a Rectangle by a given offset.

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle to adjust.

x number

The distance to move the Rectangle horizontally.

y number

The distance to move the Rectangle vertically.

Returns:
Description:

The adjusted Rectangle.

Since: 3.0.0