1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
draw_self(); |
4 |
shader_set(sh_meter); |
5 |
color_fill = lerp(color_fill, curr_fill, 0.1); |
6 |
shader_set_uniform_f(u_nb_rect, color_fill - 1); |
7 |
shader_set_uniform_f(u_time, current_time / 1000); |
8 |
for (var i = 0; i < curr_fill; i++) |
9 |
draw_rectangle(x + cood_offset[0] + (i * 10), y + cood_offset[1], x + cood_offset[0] + (i * 10) + 8, y + cood_offset[1] + 14, false); |
10 |
if (curr_fill != prev_fill) |
11 |
{ |
12 |
anim_curve = (power(a + b, a + b) / (power(a, a) * power(b, b))) * power(anim_timer, a) * power(1 - anim_timer, b) * 1.5; |
13 |
anim_timer += spd; |
14 |
rect_centered_coods = [x + cood_offset[0] + (curr_fill * 10) + 4, y + cood_offset[1] + 7]; |
15 |
draw_rectangle(rect_centered_coods[0] - (4 * anim_curve), rect_centered_coods[1] - (7 * anim_curve), rect_centered_coods[0] + (4 * anim_curve), rect_centered_coods[1] + (7 * anim_curve), false); |
16 |
if (anim_timer >= 1) |
17 |
{ |
18 |
if (curr_fill != 0) |
19 |
global.enemy_attacking = true; |
20 |
prev_fill = curr_fill; |
21 |
anim_timer = 0.3737; |
22 |
} |
23 |
} |
24 |
shader_reset(); |
25 |
if (prev_fill == 0) |
26 |
{ |
27 |
anim_curve = round((cos(current_time / 300) * 0.5) + 0.5) * 255; |
28 |
image_blend = make_color_rgb(255, 255, anim_curve); |
29 |
} |