1 |
col = 0; |
2 |
if (collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_heart, 0, 1)) |
3 |
col = 1; |
4 |
if (side == 1) |
5 |
{ |
6 |
if (collision_rectangle(bbox_left + sprite_width + 1, bbox_top, bbox_right + sprite_width + 1, bbox_bottom, obj_heart, 0, 1)) |
7 |
col = 1; |
8 |
} |
9 |
if (side == 2) |
10 |
{ |
11 |
if (collision_rectangle(bbox_left - sprite_width - 1, bbox_top, bbox_right - sprite_width - 1, bbox_bottom, obj_heart, 0, 1)) |
12 |
col = 1; |
13 |
} |
14 |
if (col == 1) |
15 |
event_user(11); |
16 |
if (collision_rectangle(x + 2, y + 6, x + 22, y + 28, obj_heartshot, 0, 1)) |
17 |
{ |
18 |
g = collision_rectangle(x + 2, y + 6, x + 22, y + 28, obj_heartshot, 0, 1); |
19 |
if (instance_exists(obj_ratingsmaster)) |
20 |
global.ratings += 20; |
21 |
with (g) |
22 |
instance_destroy(); |
23 |
if (shot == 0) |
24 |
{ |
25 |
playdo = 1; |
26 |
myloop = audio_play_sound(snd_mtt_prebomb, 40, true); |
27 |
shot = 1; |
28 |
} |
29 |
} |
30 |
s += 1; |
31 |
if (shot > 0) |
32 |
{ |
33 |
shot2 += 1; |
34 |
image_speed = 1; |
35 |
if (shot2 >= 6) |
36 |
{ |
37 |
playdo = 0; |
38 |
audio_stop_sound(myloop); |
39 |
snd_play(snd_bomb); |
40 |
if (!instance_exists(obj_shaker)) |
41 |
scr_shakescr_shakeinstance_create(0, 0, obj_shaker);
obj_shaker.hshake = argument0;
obj_shaker.vshake = argument1;
obj_shaker.shakespeed = argument2; (3, 3, 2); |
42 |
instance_create(x + 2, y + 6, obj_plusbomb_explosion); |
43 |
instance_destroy(); |
44 |
} |
45 |
} |
46 |
if (side == 1) |
47 |
{ |
48 |
if (collision_rectangle(x + 2 + sprite_width + 1, y + 6, x + 22 + sprite_width + 1, y + 28, obj_heartshot, 0, 1)) |
49 |
{ |
50 |
g = collision_rectangle(x + 2 + sprite_width + 1, y + 6, x + 22 + sprite_width + 1, y + 28, obj_heartshot, 0, 1); |
51 |
with (g) |
52 |
instance_destroy(); |
53 |
} |
54 |
} |
55 |
if (side == 2) |
56 |
{ |
57 |
if (collision_rectangle((x + 2) - sprite_width - 1, y + 6, (x + 22) - sprite_width - 1, y + 28, obj_heartshot, 0, 1)) |
58 |
{ |
59 |
g = collision_rectangle((x + 2) - sprite_width - 1, y + 6, (x + 22) - sprite_width - 1, y + 28, obj_heartshot, 0, 1); |
60 |
with (g) |
61 |
instance_destroy(); |
62 |
} |
63 |
} |
64 |
x = xstart + (sin(s / sp) * sf); |