1 |
siner += 1; |
2 |
if (on >= 1 && on <= 4) |
3 |
{ |
4 |
if (on == 1 && special == 1) |
5 |
{ |
6 |
special = 2; |
7 |
tenta1 = instance_create(x - 32, y, obj_oniont); |
8 |
tenta1.on = 1; |
9 |
tenta1.type = 2; |
10 |
tenta1.special = 1; |
11 |
tenta2 = instance_create(x + 8, y + 20, obj_oniont); |
12 |
tenta2.on = 1; |
13 |
tenta2.type = 3; |
14 |
tenta2.special = 1; |
15 |
} |
16 |
if (on == 1 || on == 2 || on == 3) |
17 |
{ |
18 |
if (onion_blue_alpha < 1) |
19 |
onion_blue_alpha += 0.05; |
20 |
} |
21 |
draw_sprite_ext(spr_onionblue, 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); |
22 |
} |
23 |
if (on == 2 || on == 3 || on == 4) |
24 |
{ |
25 |
if (global.flag[20 animation_index] == 0) |
26 |
onionsprite = spr_onionsan_kawaii; |
27 |
if (global.flag[20 animation_index] == 1) |
28 |
onionsprite = spr_onionsan_yhear; |
29 |
if (global.flag[20 animation_index] == 2) |
30 |
onionsprite = spr_onionsan_wistful; |
31 |
if (global.flag[20 animation_index] == 3) |
32 |
onionsprite = spr_onionsan_disappoint; |
33 |
draw_sprite_part(onionsprite, floor(siner / 6), 0, 0, 63, floor(onionh), x - 32, y - floor(onionh)); |
34 |
if (on == 2 || on == 3) |
35 |
{ |
36 |
if (onionh < 63) |
37 |
onionh += 0.5; |
38 |
} |
39 |
if (on == 4) |
40 |
{ |
41 |
if (onionh > 0) |
42 |
onionh -= 0.5; |
43 |
else if (onion_blue_alpha > 0) |
44 |
onion_blue_alpha -= 0.05; |
45 |
} |
46 |
} |
47 |
if (follow == 1) |
48 |
{ |
49 |
if (x < 162) |
50 |
{ |
51 |
x = 162; |
52 |
hspeed = 0; |
53 |
} |
54 |
if (x > 1048) |
55 |
{ |
56 |
x = 1048; |
57 |
hspeed = 0; |
58 |
} |
59 |
if (x < (obj_mainchara.x - 4)) |
60 |
{ |
61 |
hspeed += 0.17; |
62 |
x += 1; |
63 |
} |
64 |
if (x > (obj_mainchara.x + 6)) |
65 |
{ |
66 |
hspeed -= 0.17; |
67 |
x -= 1; |
68 |
} |
69 |
friction = 0.1; |
70 |
x = floor(x); |
71 |
} |