1 |
draw_self() |
2 |
if (is_charging && (!is_charged)) |
3 |
{ |
4 |
draw_set_circle_precision(8) |
5 |
var dir_offset = 180 * charge_percentage |
6 |
var distance = 25 * charge_percentage |
7 |
var circle_alpha = 0.8 - charge_percentage |
8 |
var custom_col = make_color_rgb(255, (255 - 255 * charge_percentage), 255) |
9 |
draw_set_color(custom_col) |
10 |
draw_set_alpha(circle_alpha) |
11 |
for (var i = 0; i < 360; i += 90) |
12 |
{ |
13 |
var xx = x + (lengthdir_x(distance, (i + dir_offset))) |
14 |
var yy = y + (lengthdir_y(distance, (i + dir_offset))) |
15 |
draw_circle(xx, yy, 6, false) |
16 |
} |
17 |
draw_set_alpha(1) |
18 |
draw_set_circle_precision(24) |
19 |
} |
20 |
shader_set(sh_flash) |
21 |
draw_set_alpha(charged_overlay_alpha) |
22 |
draw_sprite(sprite_index, image_index, x, y) |
23 |
draw_set_alpha(1) |
24 |
shader_reset() |
25 |
if is_charged |
26 |
{ |
27 |
shader_set(sh_flash) |
28 |
draw_set_alpha(charged_overlay_alpha) |
29 |
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, ((sin(current_time / 100)) * 0.15 + 0.15)) |
30 |
draw_set_alpha(1) |
31 |
shader_reset() |
32 |
} |