1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = 3154 |
4 |
if (dir_start == -1) |
5 |
{ |
6 |
dir_start = gravity_direction |
7 |
image_angle = dir_start - 270 |
8 |
} |
9 |
if (image_alpha < 1) |
10 |
image_alpha += 0.2 |
11 |
else if (noloop == false) |
12 |
{ |
13 |
var base_speed = 12 |
14 |
switch gravity_direction |
15 |
{ |
16 |
case 0: |
17 |
break |
18 |
case 180: |
19 |
break |
20 |
case 90: |
21 |
break |
22 |
case 270: |
23 |
break |
24 |
default: |
25 |
|
26 |
} |
27 |
|
28 |
gravity = 0.5 |
29 |
noloop = true |
30 |
} |
31 |
if (noloop == true && dir_switch == false) |
32 |
{ |
33 |
if self.bomb_collision_check() |
34 |
{ |
35 |
dir_switch = true |
36 |
var angle_dif = angle_difference(gravity_direction, point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)) |
37 |
gravity_direction -= (angle_dif * 0.01) |
38 |
} |
39 |
} |
40 |
if dir_switch |
41 |
{ |
42 |
angle_dif = angle_difference(gravity_direction, (dir_start - 180)) |
43 |
gravity_direction -= (angle_dif * 0.5) |
44 |
gravity = 0.8 |
45 |
if (abs(angle_dif) <= 1 && speed > 1) |
46 |
{ |
47 |
if (self.bomb_collision_check() && (!destroy_check)) |
48 |
{ |
49 |
audio_play_sound(snd_bullet_warning, 1, 0) |
50 |
destroy_check = true |
51 |
image_blend = c_red |
52 |
alarm[0] = 3 |
53 |
} |
54 |
} |
55 |
} |
56 |
if (destroy_check == true) |
57 |
{ |
58 |
destroy_timer-- |
59 |
if (destroy_timer <= 0) |
60 |
instance_destroy() |
61 |
} |
62 |
function bomb_collision_check_gml_Object_obj_battle_enemy_attack_axis_bomb_geno_Step_0() //gml_Script_bomb_collision_check_gml_Object_obj_battle_enemy_attack_axis_bomb_geno_Step_0 |
63 |
{ |
64 |
if (dir_start == 90 || dir_start == 270) |
65 |
{ |
66 |
if collision_line((x - 900), y, (x + 900), y, obj_heart_battle_fighting_parent, false, true) |
67 |
return true; |
68 |
} |
69 |
else if (dir_start == 0 || dir_start == 180) |
70 |
{ |
71 |
if collision_line(x, (y - 900), x, (y + 900), obj_heart_battle_fighting_parent, false, true) |
72 |
return true; |
73 |
} |
74 |
} |
75 |
|
76 |
speed = clamp(speed, 0, speed_max) |