-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTitleControl.gd
71 lines (57 loc) · 1.85 KB
/
TitleControl.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
extends Node2D
var pressed = true
func _ready():
# if get_tree().get_root().get_node("Inventory/GameOver") != null:
# get_tree().get_root().get_node("Inventory/GameOver").queue_free()
get_parent().get_node("Anim").play("Another")
get_tree().get_root().get_node("Inventory").InvKey(false)
yield(get_parent().get_node("Anim"), "animation_finished")
pressed = false
func _on_Play_pressed():
if pressed==false:
rank(false)
pressed = true
get_parent().get_node("Anim").play("SlideDown")
yield(get_parent().get_node("Anim"), "animation_finished")
get_tree().change_scene("res://Scenes/Cutscenes/Tutorial.tscn")
var inirank = false
func rank(boolrk):
if boolrk == true:
get_parent().get_node("Rank").show()
boolrk = false
inirank = true
elif boolrk == false:
get_parent().get_node("Rank").hide()
boolrk = true
inirank = false
pressed = false
func _on_Ranking_pressed():
if pressed==false:
pressed = true
if inirank ==true:
rank(false)
elif inirank == false:
rank(true)
var showedCredits = false
func _on_Creditos_pressed():
if pressed==false:
rank(false)
pressed = true
if showedCredits == false:
get_parent().get_node("Anim").play_backwards("credits_show")
showedCredits = true
yield(get_parent().get_node("Anim"), "animation_finished")
get_parent().get_node("Creditos/Button back").show()
elif showedCredits == true:
get_parent().get_node("Anim").play("credits_show")
get_parent().get_node("Creditos/Button back").hide()
showedCredits = false
yield(get_parent().get_node("Anim"), "animation_finished")
get_parent().get_node("Anim").play("Static")
pressed = false
func _on_backtotitle_pressed():
_on_Creditos_pressed()
func _on_skipintro_pressed():
get_parent().get_node("Anim/skipintro").queue_free()
get_parent().get_node("Anim").stop()
get_parent().get_node("Anim").play("Another_skip")