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 |
x_target = x_previous - (lengthdir_x((sign(flying_speed) * 20), direction)) |
27 |
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 |
scene++ |
36 |
break |
37 |
case 3: |
38 |
x += lengthdir_x(flying_speed, direction) |
39 |
y += ((lengthdir_y(flying_speed, direction)) + grav_speed) |
40 |
if (flying_speed > 0) |
41 |
flying_speed -= 0.1 |
42 |
else |
43 |
flying_speed = 0 |
44 |
break |
45 |
} |