Phaser API Documentation

  Version: 
Filter

FX Controller is the base class that all built-in FX use.

You should not normally create an instance of this class directly, but instead use one of the built-in FX that extend it.

Constructor:

new Controller(type, gameObject)

Parameters:

name type description
type number

The FX Type constant.

gameObject Phaser.GameObjects.GameObject

A reference to the Game Object that has this fx.

Since: 3.60.0
Source: src/fx/Controller.js (Line 9)

Members

active: boolean
Focus
Focus

Description:

Toggle this boolean to enable or disable this effect, without removing and adding it from the Game Object.

Only works for Pre FX.

Post FX are always active.

Type:
boolean
Since: 3.60.0
Source: src/fx/Controller.js (Line 47)
Focus
Focus

Description:

A reference to the Game Object that owns this effect.

Type:
Since: 3.60.0
Source: src/fx/Controller.js (Line 38)
Focus
Focus
type: number
Focus
Focus

Description:

The FX_CONST type of this effect.

Type:
number
Since: 3.60.0
Source: src/fx/Controller.js (Line 29)
Focus
Focus

Methods

destroy()
Focus
Focus

Description:

Destroys this FX Controller.

Since: 3.60.0
Source: src/fx/Controller.js (Line 81)
Focus
Focus
setActive(value)
Focus
Focus

Description:

Sets the active state of this FX Controller.

A disabled FX Controller will not be updated.

Parameters:

name type description
value boolean

true to enable this FX Controller, or false to disable it.

Returns:
Description:

This FX Controller instance.

Since: 3.60.0
Source: src/fx/Controller.js (Line 62)
Focus
Focus