1 | if (!fade_out) |
2 | { |
3 | draw_alpha = lerp(draw_alpha, 1, 0.15) |
4 | if (draw_alpha > 0.99) |
5 | draw_alpha = 1 |
6 | } |
7 | else |
8 | { |
9 | draw_alpha = lerp(draw_alpha, 0, 0.15) |
10 | if (draw_alpha < 0.01) |
11 | { |
12 | draw_alpha = 0 |
13 | audio_stop_sound(static_noise) |
14 | instance_destroy() |
15 | } |
16 | } |
17 | audio_sound_gain(static_noise, draw_alpha, 10) |