-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairplane.gd
More file actions
32 lines (28 loc) · 833 Bytes
/
Copy pathairplane.gd
File metadata and controls
32 lines (28 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
extends Node3D
var started = false
# Called when the node enters the scene tree for the first time.
func _ready():
await get_tree().create_timer(1.0).timeout
$CRTSound.play()
$CRTSound2.play()
await $CRTSound.finished
$AudioStreamPlayer.play()
await get_tree().create_timer(20.0).timeout
if !is_instance_valid(self):
return
if !started:
$%GameCam.start_the_game()
started = true
queue_free()
func _input(event):
if event.is_action_pressed("ui_accept"):
if !started:
started = true
$%GameCam.start_the_game()
queue_free()
var fade = -3.4
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
fade += delta * 2.0
RenderingServer.global_shader_parameter_set("crt_on", max(0.0, min(1.0, fade)))
global_position += global_transform.basis.z * delta * 250.0