1 |
var icecube = obj_snowdin_19_icecube |
2 |
if (shrink == true) |
3 |
{ |
4 |
image_xscale -= lerp(0, image_xscale, 0.03) |
5 |
image_yscale -= lerp(0, image_yscale, 0.03) |
6 |
if (icecube.shrink == true) |
7 |
phy_position_y = icecube.y - sprite_get_height(icecube.sprite_index) * icecube.image_yscale - 4 * image_yscale |
8 |
if (image_xscale < 0.3) |
9 |
instance_destroy(id, false) |
10 |
return; |
11 |
} |
12 |
if (icecube.active == true) |
13 |
return; |
14 |
if (phy_speed_y_last > 1) |
15 |
{ |
16 |
if (floor(phy_speed_y) == 0) |
17 |
{ |
18 |
if (active == 0) |
19 |
active = 1 |
20 |
} |
21 |
} |
22 |
if (abs(phy_speed_x) <= 0.3 && active == 1) |
23 |
{ |
24 |
if (!alarm[0]) |
25 |
alarm[0] = 25alarm[0]if (abs(phy_speed_x) <= 0.3)
instance_destroy() |
26 |
} |
27 |
if (phy_position_y > 180 || phy_position_x < 160 || phy_position_x > 400) |
28 |
instance_destroy() |
29 |
if active |
30 |
{ |
31 |
if (abs(phy_speed_x) > ball_speed) |
32 |
phy_speed_x = sign(phy_speed_x) * ball_speed |
33 |
} |
34 |
phy_rotation += (sqrt(sqr(phy_speed_x)) * sign(phy_speed_x) * 10) |
35 |
phy_speed_y_last = phy_speed_y |
36 |
phy_speed_x_last = phy_speed_y |