1 |
if (image_alpha < 1) |
2 |
{ |
3 |
image_alpha = lerp(image_alpha, 1, 0.15); |
4 |
if (image_alpha >= 0.99) |
5 |
image_alpha = 1; |
6 |
} |
7 |
if (attack_state == 1) |
8 |
{ |
9 |
x = lerp(x, coin[coin_current].x, 0.15); |
10 |
y = lerp(y, coin[coin_current].y, 0.15); |
11 |
if (point_distance(x, y, coin[coin_current].x, coin[coin_current].y) <= 3) |
12 |
{ |
13 |
instance_destroy(coin[coin_current]); |
14 |
audio_play_sound(snd_feisty_mooch_coin_grab, 1, 0); |
15 |
attack_state = 0; |
16 |
coin_current++; |
17 |
if (coin_current < array_length(coin)) |
18 |
{ |
19 |
alarm[0] = move_delay; |
20 |
} |
21 |
else |
22 |
{ |
23 |
with (obj_attack_mooch_coin_bag_controller) |
24 |
instance_destroy(); |
25 |
} |
26 |
} |
27 |
} |