|
1
|
if (balloon_move)
|
|
2
|
{
|
|
3
|
balloon_siner += 0.3;
|
|
4
|
balloon_flip_timer++;
|
|
5
|
for (var i = 0; i < array_length_1d(balloon); i++)
|
|
6
|
balloon[i].y = balloon[i].ystart + (sin(balloon_siner / 3) * 4);
|
|
7
|
if ((balloon_flip_timer % 120) == 1)
|
|
8
|
{
|
|
9
|
with (balloon[0])
|
|
10
|
scr_flipscr_flip
function scr_flip(arg0)
{
if (arg0 == "h" || arg0 == "x")
{
x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale);
image_xscale = -image_xscale;
}
else
{
y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale);
image_yscale = -image_yscale;
}
} ("x");
|
|
11
|
}
|
|
12
|
if ((balloon_flip_timer % 90) == 1)
|
|
13
|
{
|
|
14
|
with (balloon[1])
|
|
15
|
scr_flipscr_flip
function scr_flip(arg0)
{
if (arg0 == "h" || arg0 == "x")
{
x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale);
image_xscale = -image_xscale;
}
else
{
y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale);
image_yscale = -image_yscale;
}
} ("x");
|
|
16
|
}
|
|
17
|
}
|