1 |
if (stayVisible == 1) |
2 |
image_alpha = 1; |
3 |
if (fadeout) |
4 |
{ |
5 |
if (stayVisible == 1) |
6 |
stayVisible = 0; |
7 |
image_alpha = clamp(image_alpha - 0.1, 0, 1); |
8 |
} |
9 |
var height = image_yscale / f; |
10 |
if (image_yscale > 2) |
11 |
{ |
12 |
for (i = 0; i < height; i += 1) |
13 |
{ |
14 |
done = 0; |
15 |
if (i == 0) |
16 |
{ |
17 |
draw_sprite_ext(spr_forcefield_top, siner / 3, x, y + (i * 20 * f), 1 * f, 1 * f, 0, c_white, image_alpha); |
18 |
done = 1; |
19 |
} |
20 |
if (i > 0 && done == 0) |
21 |
{ |
22 |
if ((i + 1) >= height) |
23 |
draw_sprite_ext(spr_forcefield_top, siner / 3, x, y + (i * 20 * f) + (20 * f), 1 * f, -1 * f, 0, c_white, image_alpha); |
24 |
else |
25 |
draw_sprite_ext(spr_forcefield_middle, siner / 3, x, y + (i * 20 * f), 1 * f, 1 * f, 0, c_white, image_alpha); |
26 |
done = 1; |
27 |
} |
28 |
} |
29 |
} |
30 |
var width = image_xscale / f; |
31 |
if (image_xscale > 2) |
32 |
{ |
33 |
for (j = 0; j < width; j += 1) |
34 |
{ |
35 |
done = 0; |
36 |
if (j == 0) |
37 |
{ |
38 |
draw_sprite_ext(spr_forcefield_right, siner / 3, x + (j * 20 * f), y, 1 * f, 1 * f, 0, c_white, image_alpha); |
39 |
done = 1; |
40 |
} |
41 |
if (j > 0 && done == 0) |
42 |
{ |
43 |
if ((j + 1) >= width) |
44 |
draw_sprite_ext(spr_forcefield_right, siner / 3, x + (j * 20 * f) + (20 * f), y, -1 * f, 1 * f, 0, c_white, image_alpha); |
45 |
else |
46 |
draw_sprite_ext(spr_forcefield_right_middle, siner / 3, x + (j * 20 * f) + (20 * f), y, -1 * f, 1 * f, 0, c_white, image_alpha); |
47 |
done = 1; |
48 |
} |
49 |
} |
50 |
} |
51 |
siner += 1; |
52 |
if (fadeout && image_alpha == 0) |
53 |
instance_destroy(); |