| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
switch (scene) |
| 4 |
{ |
| 5 |
case 0: |
| 6 |
image_alpha += 0.05; |
| 7 |
image_xscale = image_alpha; |
| 8 |
image_yscale = image_alpha; |
| 9 |
image_angle = 359 - (359 * image_alpha); |
| 10 |
if (image_alpha >= 1) |
| 11 |
{ |
| 12 |
image_alpha = 1; |
| 13 |
scene++; |
| 14 |
} |
| 15 |
image_xscale = image_alpha; |
| 16 |
image_yscale = image_alpha; |
| 17 |
image_angle = 359 - (359 * image_alpha); |
| 18 |
break; |
| 19 |
case 1: |
| 20 |
speed = lerp(speed, target_speed, 0.05); |
| 21 |
target_dir = point_direction(x, y, heart.x, heart.y); |
| 22 |
direction += (angle_difference(target_dir, direction) * 0.15); |
| 23 |
break; |
| 24 |
} |
| 25 |
if (scene > 0) |
| 26 |
{ |
| 27 |
speed_dec = target_speed + 1; |
| 28 |
if (scr_enemy_attack_bullet_hitscr_enemy_attack_bullet_hitfunction scr_enemy_attack_bullet_hit()
{
if (live_call())
return global.live_result;
if (variable_instance_exists(id, "bullet_hit_draw_timer"))
{
if (bullet_hit_draw_timer > 0)
bullet_hit_draw_timer -= 1;
}
var collider_id = instance_place(x, y, obj_heart_yellow_shot);
if (collider_id != -4)
{
var collider_object_index = collider_id.object_index;
instance_create_depth(collider_id.x, collider_id.bbox_top, -999, obj_heart_yellow_shot_destroy);
if (collider_object_index == 690)
{
if (object_index == obj_ceroba_phase_2_bell)
instance_destroy(collider_id);
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
exit;
if (collider_object_index == 690)
collider_id_last = collider_id;
}
else if (collider_object_index == 2561)
{
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
exit;
collider_id_last = collider_id;
}
else if (!variable_instance_exists(id, "collider_id_last") || collider_id != collider_id_last)
{
collider_id.alarm[0] = 1;
collider_id.image_alpha = 0;
collider_id_last = collider_id;
}
audio_play_sound(snd_arc_hit, 0.1, 0);
if (variable_instance_exists(id, "bullet_hit_points"))
{
bullet_hit_draw_timer = 5;
if (collider_object_index == 690)
bullet_hit_points -= 3;
else
bullet_hit_points -= 1;
if (bullet_hit_points <= 0)
bullet_destroy_self = true;
}
return true;
}
} () && speed > speed_min) |
| 29 |
speed -= speed_dec; |
| 30 |
if (bullet_destroy_self) |
| 31 |
{ |
| 32 |
var spawn_count = 2; |
| 33 |
for (var i = 0; i < spawn_count; i++) |
| 34 |
{ |
| 35 |
var star = instance_create_depth(x + random_range(-10, 10), y + random_range(-10, 10), depth, obj_fmartlet_star_medium); |
| 36 |
star.direction = (direction - 180) + (45 * i); |
| 37 |
star.speed = star.target_speed * 0.5; |
| 38 |
} |
| 39 |
instance_create_depth(x, y, depth - 1, obj_fmartlet_star_destroy); |
| 40 |
obj_fmartlet_star_destroy.sprite_index = destroy_sprite; |
| 41 |
instance_destroy(); |
| 42 |
} |
| 43 |
} |
| 44 |
x = clamp(x, 0, 640); |