| 1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
| 2 |
{ |
| 3 |
instance_destroy(); |
| 4 |
exit; |
| 5 |
} |
| 6 |
x = attack_target_x + lengthdir_x(attack_distance, attack_dir); |
| 7 |
y = attack_target_y + lengthdir_y(attack_distance, attack_dir); |
| 8 |
if (image_alpha < 1 && can_move == false) |
| 9 |
{ |
| 10 |
image_alpha += 0.25; |
| 11 |
if (image_alpha >= 1) |
| 12 |
{ |
| 13 |
image_alpha = 1; |
| 14 |
can_move = true; |
| 15 |
} |
| 16 |
} |
| 17 |
if (can_move == true) |
| 18 |
{ |
| 19 |
if (attack_dir < 360) |
| 20 |
attack_dir += bullet_speed; |
| 21 |
else |
| 22 |
attack_dir = bullet_speed; |
| 23 |
bullet_speed = lerp(bullet_speed, bullet_speed_max, 0.5); |
| 24 |
homing_speed = lerp(homing_speed, homing_speed_max, 0.4); |
| 25 |
if (attack_distance > 0) |
| 26 |
attack_distance -= homing_speed; |
| 27 |
else |
| 28 |
instance_destroy(); |
| 29 |
} |