| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
switch (scene) |
| 4 |
{ |
| 5 |
case 0: |
| 6 |
var x_target = x_previous + lengthdir_x(30, direction); |
| 7 |
var y_target = y_previous + lengthdir_y(30, direction); |
| 8 |
if (distance_to_point(x_target, y_target) > 0.1) |
| 9 |
{ |
| 10 |
x = lerp(x, x_target, 0.1); |
| 11 |
y = lerp(y, y_target, 0.1); |
| 12 |
peek_distance -= 1; |
| 13 |
} |
| 14 |
else |
| 15 |
{ |
| 16 |
x_previous = x; |
| 17 |
y_previous = y; |
| 18 |
peek_distance = 5; |
| 19 |
scene++; |
| 20 |
} |
| 21 |
break; |
| 22 |
case 1: |
| 23 |
cutscene_wait(0.25); |
| 24 |
break; |
| 25 |
case 2: |
| 26 |
var x_target = x_previous - lengthdir_x(sign(flying_speed) * 20, direction); |
| 27 |
var y_target = y_previous - lengthdir_y(sign(flying_speed) * 20, direction); |
| 28 |
if (distance_to_point(x_target, y_target) > 0.1) |
| 29 |
{ |
| 30 |
x = lerp(x, x_target, 0.1); |
| 31 |
y = lerp(y, y_target, 0.1); |
| 32 |
peek_distance -= 1; |
| 33 |
} |
| 34 |
else |
| 35 |
{ |
| 36 |
scene++; |
| 37 |
} |
| 38 |
break; |
| 39 |
case 3: |
| 40 |
x += lengthdir_x(flying_speed, direction); |
| 41 |
y += (lengthdir_y(flying_speed, direction) + grav_speed); |
| 42 |
if (flying_speed > 0) |
| 43 |
flying_speed -= 0.1; |
| 44 |
else |
| 45 |
flying_speed = 0; |
| 46 |
break; |
| 47 |
} |