1 |
siner += 1; |
2 |
if (on >= 1 && on <= 4) |
3 |
{ |
4 |
if (on == 1 || on == 2 || on == 3) |
5 |
{ |
6 |
if (onion_blue_alpha < 1) |
7 |
onion_blue_alpha += 0.1; |
8 |
} |
9 |
draw_sprite_ext(spr_oniontblue, 0, x, y, 0.1 + onion_blue_alpha + (sin(siner / 4) * 0.05), onion_blue_alpha + (sin(siner / 4) * 0.05), 0, c_white, onion_blue_alpha); |
10 |
} |
11 |
if (on == 2 || on == 3 || on == 4) |
12 |
{ |
13 |
if (type == 0) |
14 |
sprite_index = spr_oniont_l; |
15 |
if (type == 1) |
16 |
sprite_index = spr_oniont_r; |
17 |
if (type == 2) |
18 |
sprite_index = spr_oniont_coyl; |
19 |
if (type == 3) |
20 |
sprite_index = spr_oniont_coyd; |
21 |
if (type == 4) |
22 |
sprite_index = spr_oniont_bye; |
23 |
if (type == 0 || type == 1 || type == 2) |
24 |
draw_sprite_part(sprite_index, floor(siner / 6), 0, 0, sprite_width, floor(onionh), x - floor(sprite_width / 2), y - floor(onionh)); |
25 |
if (type == 3) |
26 |
draw_sprite_part(sprite_index, floor(siner / 6), 0, 0, sprite_width, floor(onionh), x - 22, y - floor(onionh)); |
27 |
if (type == 4) |
28 |
draw_sprite_part(sprite_index, floor(siner / 6), 0, 0, sprite_width, floor(onionh), x - 6, y - floor(onionh)); |
29 |
if (on == 2 || on == 3) |
30 |
{ |
31 |
if (onionh < sprite_height) |
32 |
{ |
33 |
if (special == 0) |
34 |
onionh += 1; |
35 |
if (special == 1) |
36 |
onionh += 0.25; |
37 |
} |
38 |
} |
39 |
if (on == 4) |
40 |
{ |
41 |
if (onionh > 0) |
42 |
onionh -= 1; |
43 |
else if (onion_blue_alpha > 0) |
44 |
onion_blue_alpha -= 0.1; |
45 |
} |
46 |
} |
47 |
if (follow == 1) |
48 |
{ |
49 |
if (x < 162) |
50 |
{ |
51 |
x = xprevious; |
52 |
hspeed = 0; |
53 |
} |
54 |
if (x > 1048) |
55 |
{ |
56 |
x = xprevious; |
57 |
hspeed = 0; |
58 |
} |
59 |
if (x < (obj_mainchara.x + 6)) |
60 |
hspeed += 0.17; |
61 |
if (x > (obj_mainchara.x + 16)) |
62 |
hspeed -= 0.17; |
63 |
friction = 0.1; |
64 |
x = floor(x); |
65 |
} |