1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
image_angle = round(direction); |
4 |
if (laser_grow == true) |
5 |
{ |
6 |
var target_width = 1.35; |
7 |
laser_width = lerp(laser_width, target_width, 0.5); |
8 |
if (abs(laser_width - target_width) < 0.1) |
9 |
laser_grow = false; |
10 |
} |
11 |
else if (laser_shrink == true) |
12 |
{ |
13 |
var target_width = 0; |
14 |
laser_width = lerp(laser_width, target_width, 0.5); |
15 |
if (abs(laser_width - target_width) < 0.1) |
16 |
instance_destroy(); |
17 |
} |
18 |
else |
19 |
{ |
20 |
sin_timer += 30; |
21 |
sin_timer_current = degtorad(sin_timer); |
22 |
var target_width = 1 + (sin(sin_timer_current) * 0.2); |
23 |
laser_width = lerp(laser_width, target_width, 0.25); |
24 |
} |
25 |
if (impact_frame_current < (impact_frame_max + 1)) |
26 |
impact_frame_current += impact_frame_speed; |
27 |
else |
28 |
impact_frame_current = 0; |