1 |
currentdir = direction; |
2 |
if (direction == 0 && currentdir > 260) |
3 |
currentdir = -90; |
4 |
if (direction == 270 && currentdir < 45) |
5 |
currentdir = 360; |
6 |
prevdir = currentdir; |
7 |
if (abs(currentdir - direction) <= 90) |
8 |
{ |
9 |
if ((currentdir - direction) > 0) |
10 |
currentdir -= 45; |
11 |
if ((currentdir - direction) < 0) |
12 |
currentdir += 45; |
13 |
} |
14 |
else |
15 |
{ |
16 |
if ((currentdir - direction) > 0) |
17 |
currentdir = direction + 45; |
18 |
if ((currentdir - direction) < 0) |
19 |
currentdir = direction - 45; |
20 |
} |
21 |
if (con == 0) |
22 |
draw_sprite_ext(spr_holemouse_emerge, 0, x + 20, y + 20, 2, 2, 0, c_white, image_alpha); |
23 |
if (con == 1) |
24 |
{ |
25 |
draw_set_color(c_white); |
26 |
draw_sprite_ext(spr_holemouse_tail, timer / 2, x + 20, y + 20, 2, 2, prevdir, c_white, image_alpha); |
27 |
draw_sprite_ext(spr_holemouse, 0, x + 20, y + 20, 2, 2, currentdir, c_white, image_alpha); |
28 |
} |
29 |
if (con == 2) |
30 |
draw_sprite_ext(spr_holemouse_exit, 0, x + 20, y + 20, 2, 2, 0, c_white, image_alpha); |
31 |
if (con >= 5) |
32 |
{ |
33 |
draw_set_color(c_black); |
34 |
draw_ellipse((x + 20) - 10, y + 20 + 15, x + 20 + 10, y + 20 + 20, false); |
35 |
if (customSprite == spr_holemouse) |
36 |
{ |
37 |
draw_sprite_ext(spr_holemouse_tail, timer / 2, x + 20, y + 20 + fakeY, 2, 2, prevdir, c_white, image_alpha); |
38 |
draw_sprite_ext(spr_holemouse, 0, x + 20, y + 20 + fakeY, 2, 2, currentdir, c_white, image_alpha); |
39 |
} |
40 |
else |
41 |
{ |
42 |
draw_sprite_ext(customSprite, 0, x + 20, y + 20 + fakeY, 2, 2, 0, c_white, image_alpha); |
43 |
} |
44 |
} |