new ScreenFlash(game, color)
Creates a new Juicy.ScreenFlash
object.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
game |
Phaser.Game | Current game instance. |
|
color |
string | 'white' | The color to flash the screen. |
- Source - out/plugins/Juicy/Juicy.js, line 74
Methods
-
flash(maxAlpha, duration)
-
Flashes the screen
Parameters:
Name Type Argument Default Description maxAlpha
number <optional>
1 The maximum alpha to flash the screen to
duration
number <optional>
100 The duration of the flash in milliseconds
- Source - out/plugins/Juicy/Juicy.js, line 88