| 1 |
if (bbox_top < (box.bbox_top + 5)) |
| 2 |
{ |
| 3 |
y += y_speed; |
| 4 |
while (bbox_top > (box.bbox_top + 5)) |
| 5 |
y -= 1; |
| 6 |
if (bbox_top == (box.bbox_top + 5)) |
| 7 |
{ |
| 8 |
in_box = true; |
| 9 |
alarm[0] = animate_alarm; |
| 10 |
} |
| 11 |
} |
| 12 |
if (animate_state == 1) |
| 13 |
{ |
| 14 |
image_xscale -= anim_in_speed; |
| 15 |
image_yscale -= anim_in_speed; |
| 16 |
if (image_xscale <= anim_min) |
| 17 |
{ |
| 18 |
image_xscale = anim_min; |
| 19 |
image_yscale = anim_min; |
| 20 |
animate_state = 2; |
| 21 |
} |
| 22 |
} |
| 23 |
else if (animate_state == 2) |
| 24 |
{ |
| 25 |
image_xscale += anim_out_speed; |
| 26 |
image_yscale += anim_out_speed; |
| 27 |
if (image_xscale >= anim_max) |
| 28 |
{ |
| 29 |
image_xscale = anim_max; |
| 30 |
image_yscale = anim_max; |
| 31 |
animate_state = 0; |
| 32 |
event_user(0); |
| 33 |
} |
| 34 |
} |