1 |
image_alpha = global.image_alpha_enemy_attacking |
2 |
if (fade_direction == "in") |
3 |
{ |
4 |
image_alpha_factor += 0.1 |
5 |
if (image_alpha_factor > 1) |
6 |
image_alpha_factor = 1 |
7 |
if (image_alpha_factor == 1) |
8 |
fade_direction = "nothing" |
9 |
} |
10 |
if (fade_direction == "out") |
11 |
{ |
12 |
image_alpha_factor -= 0.1 |
13 |
if (image_alpha_factor < 0) |
14 |
image_alpha_factor = 0 |
15 |
if (image_alpha_factor == 0) |
16 |
instance_destroy() |
17 |
} |
18 |
image_alpha = global.image_alpha_enemy_attacking * image_alpha_factor |
19 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
20 |
animation_disjoint_x = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
21 |
time_elapsed += time_increase |
22 |
if (time_elapsed >= time_max) |
23 |
{ |
24 |
time_elapsed = 0 |
25 |
sign_modifier = (-sign_modifier) |
26 |
} |
27 |
x = draw_position_x + animation_disjoint_x |
28 |
y -= y_increase |