1 | if (fade_out == true) |
2 | { |
3 | if (image_alpha > 0.01) |
4 | image_alpha = lerp(image_alpha, 0, 0.1); |
5 | else |
6 | image_alpha = 0; |
7 | } |
8 | else if (image_alpha < 0.99) |
9 | { |
10 | image_alpha = lerp(image_alpha, 1, 0.1); |
11 | } |
12 | else |
13 | { |
14 | image_alpha = 1; |
15 | } |
16 | if (!petals_enabled) |
17 | { |
18 | with (obj_petal) |
19 | instance_destroy(); |
20 | exit; |
21 | } |
22 | cood_x = irandom_range(-10, room_width + 10); |
23 | current_delay++; |
24 | if (current_delay == generation_speed) |
25 | { |
26 | current_delay = 0; |
27 | instance_create_depth(cood_x, cood_y, choose(999, 999, 0), spawned_object); |
28 | } |