GameFlash
- .effectCallback({ scene, lastRoundPassed })
- .define(tag, registry)
- .subscribe(context, callback)
| State | Description |
:state(pass) | The flash is showing a pass (green) pulse |
:state(fail) | The flash is showing a fail (red) pulse |
| Property | Default | Description |
--game-flash-pass | rgba(50, 220, 120, 0.35) | Flash color on a passed round |
--game-flash-fail | rgba(230, 40, 40, 0.3) | Flash color on a failed round |
A full-screen pass/fail flash overlay. Observes game signals and briefly flashes green or red when a round completes. Uses ElementInternals custom states for styling, so per-game CSS can restyle the flash without modifying the component.
| Signal |
Usage |
| Shell signals |
Reads scene and lastRoundPassed signals to trigger flashes |
<game-flash when-some-scene="playing between paused"></game-flash>
Override colors for a light theme:
game-flash {
--game-flash-pass: rgba(0, 200, 100, 0.25);
--game-flash-fail: rgba(255, 0, 0, 0.2);
}