How to use:
- Create new shader material in your Sprite2D, add a shader, paste code or save shader file and quick load it
- flash_color is final color sprite will brighten too
- flash_value is amount to interpolate between original color and flash color, 0 is unchanged and 1 is full flash
Add an animation player or similar to your sprite, create an animation, and use shader flash_value as key frame, start at 0, next time stamp set to 1, and next time stamp set it back to 0, playing this animation will create flash effect