Flashes the Camera to or from the given color over the duration specified.
name | type | arguments | Default | description |
---|---|---|---|---|
duration | number | <optional> | 250 |
The duration of the effect in milliseconds. |
red | number | <optional> | 255 |
The amount to flash the red channel towards. A value between 0 and 255. |
green | number | <optional> | 255 |
The amount to flash the green channel towards. A value between 0 and 255. |
blue | number | <optional> | 255 |
The amount to flash the blue channel towards. A value between 0 and 255. |
force | boolean | <optional> | false |
Force the effect to start immediately, even if already running. |
callback | Phaser.Types.Cameras.Scene2D.CameraFlashCallback | <optional> |
This callback will be invoked every frame for the duration of the effect. It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. |
|
context | any | <optional> |
The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. |
The Camera on which the effect was started.