Phaser API Documentation

  Version: 
setFlip(x, y)

Description:

Sets the horizontal and vertical flipped state of this Game Object.

A Game Object that is flipped will render inversed on the flipped axis. Flipping always takes place from the middle of the texture and does not impact the scale value. If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.

Parameters:

name type description
x boolean

The horizontal flipped state. false for no flip, or true to be flipped.

y boolean

The horizontal flipped state. false for no flip, or true to be flipped.

Returns:
Description:

This Game Object instance.

Since: 3.0.0