|
1
|
event_inherited();
|
|
2
|
timer++;
|
|
3
|
for (var i = 0; i < bullets; i++)
|
|
4
|
{
|
|
5
|
with (bullet[i])
|
|
6
|
{
|
|
7
|
angle += other.turn;
|
|
8
|
dist = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (dist, (15 + (10 * other.bullets)) * other.widthmod, (other.widthmod * 3) / sqrt(dist + 1));
|
|
9
|
x = other.x + lengthdir_x(dist, angle);
|
|
10
|
y = other.y + lengthdir_y(dist * 0.66, angle);
|
|
11
|
}
|
|
12
|
}
|
|
13
|
if (timer == 10)
|
|
14
|
direction = scr_at_playerscr_at_player
function scr_at_player(arg0 = x, arg1 = y)
{
return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2));
} (x, y);
|
|
15
|
if (timer >= 10)
|
|
16
|
{
|
|
17
|
speed = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (speed, speedtarg, speedtarg / 45);
|
|
18
|
turn = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (turn, (7 * sign(turn)) / bullets, 0.1);
|
|
19
|
}
|