1 |
if (image_alpha < 1) |
2 |
{ |
3 |
image_alpha += 0.1; |
4 |
exit; |
5 |
} |
6 |
if (image_xscale > 1) |
7 |
image_xscale -= 0.05; |
8 |
if (image_yscale > 1) |
9 |
image_yscale -= 0.05; |
10 |
var xx, yy; |
11 |
switch (current_position) |
12 |
{ |
13 |
case 1: |
14 |
xx = 320; |
15 |
yy = 120; |
16 |
break; |
17 |
case 2: |
18 |
xx = 400; |
19 |
yy = 150; |
20 |
break; |
21 |
case 3: |
22 |
xx = 240; |
23 |
yy = 150; |
24 |
break; |
25 |
} |
26 |
x = lerp(x, xx, 0.5); |
27 |
y = lerp(y, yy, 0.5); |
28 |
if (x != xx || (y != yy && (alarm[0] > 0 || alarm[3] > 0)))gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Alarm_3.gmlaudio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
29 |
{ |
30 |
alarm[0] = -1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Alarm_0.gmlaudio_play_sound(snd_enemy_bullet_shot, 1, 0);
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
var bullet_arc = ((bullet_number[a] - 1) * bullet_spread) / 2;
bullet.speed = bullet_speed[a];
bullet.direction = (point_direction(x, y, 320, 320) - bullet_arc) + (i * bullet_spread);
}
}
alarm[0] = 16;
image_xscale = 1.5;
image_yscale = 1.5; |
31 |
alarm[3] = -1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Alarm_3.gmlaudio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
32 |
} |
33 |
else if (!alarm[0] && !alarm[3]) |
34 |
{ |
35 |
if (bullet_pattern_current == 1 && global.battle_phase == 2) |
36 |
bullet_pattern_current = 2; |
37 |
else |
38 |
bullet_pattern_current = 1; |
39 |
if (bullet_pattern_current == 1 && !alarm[0]) |
40 |
alarm[0] = 1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Alarm_0.gmlaudio_play_sound(snd_enemy_bullet_shot, 1, 0);
for (var a = 0; a < array_length_1d(bullet_number); a++)
{
for (var i = 0; i < bullet_number[a]; i++)
{
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
var bullet_arc = ((bullet_number[a] - 1) * bullet_spread) / 2;
bullet.speed = bullet_speed[a];
bullet.direction = (point_direction(x, y, 320, 320) - bullet_arc) + (i * bullet_spread);
}
}
alarm[0] = 16;
image_xscale = 1.5;
image_yscale = 1.5; |
41 |
if (bullet_pattern_current == 2 && !alarm[3]) |
42 |
alarm[3] = 1;gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Alarm_3.gmlaudio_play_sound(snd_enemy_bullet_shot, 1, 0);
var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet);
bullet.speed = bullet_speed_alt;
bullet.direction = point_direction(x, y, 320, 320) + bullet_spread_alt;
if (bullet_spread_inc == true)
{
if (bullet_spread_alt < bullet_spread_alt_max)
{
bullet_spread_alt += bullet_spread_amount;
}
else
{
bullet_spread_inc = false;
bullet_spread_alt -= (bullet_spread_amount / 2);
}
}
else if (bullet_spread_alt > (-bullet_spread_alt_max - (bullet_spread_amount / 2)))
{
bullet_spread_alt -= bullet_spread_amount;
}
else
{
bullet_spread_inc = true;
bullet_spread_alt += (bullet_spread_amount / 2);
}
alarm[3] = 2;
image_xscale = 1.5;
image_yscale = 1.5; |
43 |
} |