| 1 |
x_offset = 22 * cos(degtorad(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle + 34)); |
| 2 |
y_offset = 22 * sin(degtorad(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle + 34)); |
| 3 |
x = obj_battle_enemy_attack_frostermit_pincher_right_1.x + x_offset; |
| 4 |
y = obj_battle_enemy_attack_frostermit_pincher_right_1.y - y_offset; |
| 5 |
var state = obj_battle_enemy_attack_frostermit_pincher_right_1.state; |
| 6 |
if (state == "normal") |
| 7 |
{ |
| 8 |
image_angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y) + 10; |
| 9 |
} |
| 10 |
else if (state == "detract") |
| 11 |
{ |
| 12 |
no_loop_r = false; |
| 13 |
} |
| 14 |
else if (state == "retract") |
| 15 |
{ |
| 16 |
if (no_loop_r == false) |
| 17 |
{ |
| 18 |
base_angle_diff = abs(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_d_location - obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r_location); |
| 19 |
image_angle_r = image_angle; |
| 20 |
no_loop_r = true; |
| 21 |
} |
| 22 |
var image_angle_r_location = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y) + 10; |
| 23 |
var base_angle_r = obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r; |
| 24 |
var base_angle_r_location = obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r_location; |
| 25 |
var base_dividend = 1 - abs((base_angle_r_location - base_angle_r) / base_angle_diff); |
| 26 |
image_angle = image_angle_r + ((image_angle_r_location - image_angle_r) * base_dividend); |
| 27 |
} |
| 28 |
image_alpha = obj_battle_enemy_attack_frostermit_pincher_right_1.image_alpha; |