1 |
if (image_alpha < 1) |
2 |
{ |
3 |
image_alpha += 0.05 |
4 |
return; |
5 |
} |
6 |
if (card_active == true) |
7 |
{ |
8 |
x = lerp(x, card_target_x, 0.3) |
9 |
y = lerp(y, card_target_y, 0.3) |
10 |
if (abs(x - card_target_x) <= 5 && abs(y - card_target_y) <= 5) |
11 |
sprite_index = spr_attack_ace_card_back |
12 |
if (abs(x - card_target_x) <= 0.05 && abs(y - card_target_y) <= 0.05) |
13 |
{ |
14 |
x = card_target_x |
15 |
y = card_target_y |
16 |
card_active = false |
17 |
alarm[2] = reset_delayalarm[2]card_return = true
audio_play_sound(snd_card_game_deal, 1, 0)
sprite_index = -4 |
18 |
} |
19 |
} |
20 |
if (card_return == true) |
21 |
{ |
22 |
x = lerp(x, card_original_x, 0.5) |
23 |
y = lerp(y, card_original_y, 0.5) |
24 |
if (abs(x - card_original_x) <= 0.01 && abs(y - card_original_y) <= 0.01) |
25 |
{ |
26 |
x = card_original_x |
27 |
y = card_original_y |
28 |
card_return = false |
29 |
with (obj_attack_ace_dealing_cards) |
30 |
{ |
31 |
if (card_return == true) |
32 |
return; |
33 |
} |
34 |
obj_attack_ace_dealing_controller.alarm[0] = next_attack_delay |
35 |
} |
36 |
} |