1 |
if live_call() |
2 |
return global.live_result; |
3 |
image_yscale = lerp(image_yscale, 1, 0.5) |
4 |
if (fade_out == true) |
5 |
{ |
6 |
image_alpha -= 0.2 |
7 |
if (image_alpha <= 0) |
8 |
instance_destroy() |
9 |
} |
10 |
var arc_radius = 90 |
11 |
if (shoot_delay > 0) |
12 |
shoot_delay-- |
13 |
else if ((!destroy_self) && bullet_count > 0) |
14 |
{ |
15 |
var xx = x - (lengthdir_x(30, (image_angle - 90))) |
16 |
var yy = y - (lengthdir_y(30, (image_angle - 90))) |
17 |
if (spawn_direction == -1) |
18 |
{ |
19 |
spawn_direction = point_direction(xx, yy, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y) |
20 |
direction_inc = arc_radius / bullet_count |
21 |
direction_current = spawn_direction - direction_inc * ((bullet_count - 1) * 0.5) |
22 |
} |
23 |
var pellet = instance_create_depth(xx, yy, (depth - 1), obj_battle_enemy_attack_fpellets_simple) |
24 |
pellet.direction = direction_current |
25 |
pellet.speed = 6 |
26 |
shoot_delay = shoot_delay_max |
27 |
bullet_count -= 1 |
28 |
direction_current += direction_inc |
29 |
} |
30 |
if (bullet_count <= 0) |
31 |
destroy_self = true |
32 |
if (destroy_self == true) |
33 |
fade_out = true |