1 |
siner += 1; |
2 |
z_h = sin(siner * z_b) * z_a; |
3 |
y = yinit + z_h; |
4 |
if (type == 0 || type == 1) |
5 |
{ |
6 |
event_user(10); |
7 |
if (width > 0) |
8 |
{ |
9 |
if (type == 0) |
10 |
image_blend = c_white; |
11 |
if (type == 1) |
12 |
image_blend = #14A9FF; |
13 |
draw_sprite_part_ext(spr_s_bonebul_top, 0, le, 0, width, 6, x + le, y, 1, 1, image_blend, 1); |
14 |
if (type == 0) |
15 |
draw_set_color(c_white); |
16 |
if (type == 1) |
17 |
draw_set_color(#14A9FF); |
18 |
ossafe_fill_rectangle(x + 2 + rc_le, y + 5, (x + 8) - rc_cut, global.idealborder[3] - 6); |
19 |
if (width > 0) |
20 |
{ |
21 |
if (collision_rectangle(x + 2 + rc_le, y + 5, (x + 8) - rc_cut, global.idealborder[3] - 6, obj_heart, 0, 1)) |
22 |
event_user(2); |
23 |
} |
24 |
draw_sprite_part_ext(spr_s_bonebul_bottom, 0, le, 0, width, 6, x + le, global.idealborder[3] - 6, 1, 1, image_blend, 1); |
25 |
} |
26 |
} |
27 |
if (type == 2) |
28 |
{ |
29 |
event_user(10); |
30 |
if (width > 0) |
31 |
{ |
32 |
draw_sprite_part(spr_s_bonebul_top, 0, le, 0, width, 6, x + le, global.idealborder[2] + 6); |
33 |
draw_set_color(c_white); |
34 |
ossafe_fill_rectangle(x + 2 + rc_le, global.idealborder[2] + 11, (x + 8) - rc_cut, y); |
35 |
if (width > 0) |
36 |
{ |
37 |
if (collision_rectangle(x + 2 + rc_le, global.idealborder[2] + 11, (x + 8) - rc_cut, y, obj_heart, 0, 1)) |
38 |
event_user(2); |
39 |
} |
40 |
draw_sprite_part(spr_s_bonebul_bottom, 0, le, 0, width, 6, x + le, y); |
41 |
} |
42 |
} |
43 |
if (x < 0 && hspeed < 0) |
44 |
instance_destroy(); |
45 |
if (x > 640 && hspeed > 0) |
46 |
instance_destroy(); |