-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeath_screen.tscn
75 lines (56 loc) · 2.36 KB
/
death_screen.tscn
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
72
73
74
75
[gd_scene load_steps=4 format=3 uid="uid://up7vepwuke5f"]
[ext_resource type="Script" path="res://Play_again.gd" id="2_ir367"]
[sub_resource type="GDScript" id="GDScript_7li7t"]
script/source = "extends Node2D
@onready var levels: Button = $PanelContainer/VBoxContainer/Levels
@onready var quit: Button = $PanelContainer/VBoxContainer/quit
func _ready():
if OS.has_feature(\"web\"):
levels.visible = false
quit.visible = false
JavaScriptBridge.eval(\"\"\"
fetch(`https://gamesbot.u3.style/highscore/\"\"\"+str(Values.coins)+\"\"\"?game=slimedodger\"\"\"+str(Values.level)+\"\"\"&${window.location.search.substr(1)}`)
\"\"\")
func _on_quit_pressed():
get_tree().quit()
func _on_levels_pressed():
get_tree().change_scene_to_file(\"res://levels.tscn\")
"
[sub_resource type="LabelSettings" id="LabelSettings_1fqxv"]
font_size = 50
[node name="DeathScreen" type="Node2D"]
script = SubResource("GDScript_7li7t")
[node name="ColorRect" type="ColorRect" parent="."]
offset_right = 1152.0
offset_bottom = 648.0
color = Color(0.366595, 0.366595, 0.366595, 1)
[node name="PanelContainer" type="PanelContainer" parent="."]
offset_right = 1157.0
offset_bottom = 649.0
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
text = "You died"
label_settings = SubResource("LabelSettings_1fqxv")
horizontal_alignment = 1
[node name="Play_again" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 63
text = "Play Again"
script = ExtResource("2_ir367")
[node name="Levels" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 63
text = "Levels"
[node name="quit" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "quit
"
[connection signal="pressed" from="PanelContainer/VBoxContainer/Play_again" to="." method="_on_play_again_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Levels" to="." method="_on_play_again_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Levels" to="." method="_on_levels_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/quit" to="." method="_on_quit_pressed"]