summaryrefslogtreecommitdiff
path: root/UI
diff options
context:
space:
mode:
Diffstat (limited to 'UI')
-rw-r--r--UI/GameOver.gd9
-rw-r--r--UI/GameOver.tscn45
2 files changed, 54 insertions, 0 deletions
diff --git a/UI/GameOver.gd b/UI/GameOver.gd
new file mode 100644
index 0000000..6340e89
--- /dev/null
+++ b/UI/GameOver.gd
@@ -0,0 +1,9 @@
+extends Panel
+
+
+func _ready():
+ $Winner.text = Network.winning_player.name + " won!"
+
+
+func _on_BackToLobby_pressed():
+ get_tree().change_scene("res://Network/Lobby.tscn")
diff --git a/UI/GameOver.tscn b/UI/GameOver.tscn
new file mode 100644
index 0000000..67d985d
--- /dev/null
+++ b/UI/GameOver.tscn
@@ -0,0 +1,45 @@
+[gd_scene load_steps=6 format=2]
+
+[ext_resource path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="DynamicFontData" id=2]
+[ext_resource path="res://UI/GameOver.gd" type="Script" id=3]
+
+[sub_resource type="DynamicFont" id=1]
+size = 144
+font_data = ExtResource( 1 )
+
+[sub_resource type="DynamicFont" id=2]
+size = 36
+font_data = ExtResource( 2 )
+
+[node name="GameOver" type="Panel"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+script = ExtResource( 3 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="Title" type="Label" parent="."]
+margin_left = 112.0
+margin_top = 56.0
+margin_right = 891.0
+margin_bottom = 200.0
+custom_fonts/font = SubResource( 1 )
+text = "GAME OVER"
+
+[node name="Winner" type="Label" parent="."]
+margin_left = 400.0
+margin_top = 264.0
+margin_right = 585.0
+margin_bottom = 301.0
+custom_fonts/font = SubResource( 2 )
+text = "NAME won!"
+
+[node name="BackToLobby" type="Button" parent="."]
+margin_left = 448.0
+margin_top = 464.0
+margin_right = 576.0
+margin_bottom = 496.0
+text = "Back to Lobby"
+[connection signal="pressed" from="BackToLobby" to="." method="_on_BackToLobby_pressed"]