-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTitle.gd
43 lines (32 loc) · 885 Bytes
/
Title.gd
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
33
34
35
36
37
38
39
40
41
42
43
extends Node2D
signal settings_pressed
signal help_pressed
signal credits_pressed
onready var audio = get_node("AudioStreamPlayer")
onready var version_label = $CanvasLayer/Version
onready var continue_button = $CanvasLayer/Continue
func _ready():
version_label.text = "v " + Global.version
if Global.has_save():
continue_button.disabled = false
func _input(event):
if !event.is_pressed():
return
func begin_audio():
audio.play()
func _on_Start_pressed():
audio.stop()
Global.goto_scene(Global.Scene.STORY)
func _on_Settings_pressed():
emit_signal("settings_pressed")
func _on_Help_pressed():
emit_signal("help_pressed")
func _on_Credits_pressed():
audio.stop()
emit_signal("credits_pressed")
func _opened_overlay_closed(scene_type):
begin_audio()
func _on_Continue_pressed():
Global.load_game()
audio.stop()
Global.goto_scene(Global.Scene.GROUND_CONTROL)