| 1 |
switch (attack_state) |
| 2 |
{ |
| 3 |
case 1: |
| 4 |
speed = lerp(speed, 0, 0.25); |
| 5 |
if (abs(speed) <= 0.02) |
| 6 |
{ |
| 7 |
instance_create_depth(x, y, depth, obj_battle_enemy_attack_ace_shockwave); |
| 8 |
speed = 0; |
| 9 |
attack_state += 1; |
| 10 |
alarm[1] = 2; |
| 11 |
} |
| 12 |
break; |
| 13 |
case 2: |
| 14 |
var heart = obj_heart_battle_fighting_red; |
| 15 |
var target_dir = point_direction(x, y, heart.x, heart.y); |
| 16 |
if (y < heart.y) |
| 17 |
{ |
| 18 |
direction_inc = lerp(direction_inc, sign(target_dir - direction) * direction_inc_max, 0.2); |
| 19 |
direction += direction_inc; |
| 20 |
} |
| 21 |
speed = max_speed; |
| 22 |
break; |
| 23 |
} |