✨ End game
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
[gd_scene load_steps=11 format=3 uid="uid://bjhmjrldq4lkt"]
 | 
			
		||||
[gd_scene load_steps=12 format=3 uid="uid://bjhmjrldq4lkt"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://b3gx0bl43lku3" path="res://Scenes/Player.tscn" id="1_vby0g"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dk8x2aeq1eevf" path="res://Scenes/UI/BootScreen.tscn" id="2_7aede"]
 | 
			
		||||
@@ -6,6 +6,7 @@
 | 
			
		||||
[ext_resource type="Script" path="res://Scripts/Launcher.cs" id="2_u5cms"]
 | 
			
		||||
[ext_resource type="Script" path="res://Scripts/Logic/Scoreboard.cs" id="3_as2wg"]
 | 
			
		||||
[ext_resource type="Script" path="res://Scripts/Logic/World.cs" id="3_xwguj"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://cnf80yioktsvj" path="res://Scenes/UI/GameOverScreen.tscn" id="5_441wx"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://bb704b0kpwwkr" path="res://Scenes/UI/PlayerDiedScreen.tscn" id="5_pimes"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://c7w5sgq0bshk0" path="res://Scenes/UI/HUD.tscn" id="5_qvun1"]
 | 
			
		||||
[ext_resource type="PackedScene" uid="uid://dfoy57v3q4of5" path="res://Scenes/UI/Leaderboard.tscn" id="7_j24m7"]
 | 
			
		||||
@@ -17,6 +18,9 @@ properties/0/replication_mode = 1
 | 
			
		||||
properties/1/path = NodePath(".:RoundTimeLeft")
 | 
			
		||||
properties/1/spawn = true
 | 
			
		||||
properties/1/replication_mode = 1
 | 
			
		||||
properties/2/path = NodePath(".:RoundCount")
 | 
			
		||||
properties/2/spawn = true
 | 
			
		||||
properties/2/replication_mode = 1
 | 
			
		||||
 | 
			
		||||
[node name="Node" type="Node"]
 | 
			
		||||
 | 
			
		||||
@@ -38,7 +42,16 @@ script = ExtResource("3_as2wg")
 | 
			
		||||
 | 
			
		||||
[node name="OverlayLayer" type="CanvasLayer" parent="."]
 | 
			
		||||
 | 
			
		||||
[node name="PlayerDiedScreen" parent="OverlayLayer" instance=ExtResource("5_pimes")]
 | 
			
		||||
visible = false
 | 
			
		||||
 | 
			
		||||
[node name="GameOverScreen" parent="OverlayLayer" node_paths=PackedStringArray("Scoreboard") instance=ExtResource("5_441wx")]
 | 
			
		||||
process_mode = 3
 | 
			
		||||
visible = false
 | 
			
		||||
Scoreboard = NodePath("../../ScoreboardNode")
 | 
			
		||||
 | 
			
		||||
[node name="Leaderboard" parent="OverlayLayer" node_paths=PackedStringArray("Scoreboard") instance=ExtResource("7_j24m7")]
 | 
			
		||||
process_mode = 3
 | 
			
		||||
visible = false
 | 
			
		||||
Scoreboard = NodePath("../../ScoreboardNode")
 | 
			
		||||
 | 
			
		||||
@@ -46,14 +59,10 @@ Scoreboard = NodePath("../../ScoreboardNode")
 | 
			
		||||
visible = false
 | 
			
		||||
World = NodePath("../../World")
 | 
			
		||||
 | 
			
		||||
[node name="PlayerDiedScreen" parent="OverlayLayer" instance=ExtResource("5_pimes")]
 | 
			
		||||
visible = false
 | 
			
		||||
 | 
			
		||||
[node name="World" type="Node2D" parent="." node_paths=PackedStringArray("Scoreboard")]
 | 
			
		||||
script = ExtResource("3_xwguj")
 | 
			
		||||
Scoreboard = NodePath("../ScoreboardNode")
 | 
			
		||||
PlayerScene = ExtResource("1_vby0g")
 | 
			
		||||
RoundDuration = 10.0
 | 
			
		||||
 | 
			
		||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
 | 
			
		||||
root_path = NodePath("../World")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										50
									
								
								Scenes/UI/GameOverScreen.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								Scenes/UI/GameOverScreen.tscn
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
[gd_scene load_steps=2 format=3 uid="uid://cnf80yioktsvj"]
 | 
			
		||||
 | 
			
		||||
[ext_resource type="Script" path="res://Scripts/UI/GameOverScreen.cs" id="1_j12ja"]
 | 
			
		||||
 | 
			
		||||
[node name="GameOverScreen" type="Control"]
 | 
			
		||||
layout_mode = 3
 | 
			
		||||
anchors_preset = 15
 | 
			
		||||
anchor_right = 1.0
 | 
			
		||||
anchor_bottom = 1.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
script = ExtResource("1_j12ja")
 | 
			
		||||
 | 
			
		||||
[node name="CenterContainer" type="CenterContainer" parent="."]
 | 
			
		||||
offset_right = 1152.0
 | 
			
		||||
offset_bottom = 648.0
 | 
			
		||||
 | 
			
		||||
[node name="Panel" type="Panel" parent="CenterContainer"]
 | 
			
		||||
custom_minimum_size = Vector2(340, 180)
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/Panel"]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 8
 | 
			
		||||
anchor_left = 0.5
 | 
			
		||||
anchor_top = 0.5
 | 
			
		||||
anchor_right = 0.5
 | 
			
		||||
anchor_bottom = 0.5
 | 
			
		||||
offset_left = -129.5
 | 
			
		||||
offset_top = -46.5
 | 
			
		||||
offset_right = 129.5
 | 
			
		||||
offset_bottom = 46.5
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="Title" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
theme_override_font_sizes/font_size = 28
 | 
			
		||||
text = "Game over"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
 | 
			
		||||
[node name="Caption" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "You're in the 1st place"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
 | 
			
		||||
[node name="Caption2" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Hold Tab key to view leaderboard"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
@@ -13,16 +13,31 @@ layout_mode = 0
 | 
			
		||||
offset_right = 1152.0
 | 
			
		||||
offset_bottom = 648.0
 | 
			
		||||
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
 | 
			
		||||
[node name="Panel" type="Panel" parent="CenterContainer"]
 | 
			
		||||
custom_minimum_size = Vector2(340, 120)
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
 | 
			
		||||
[node name="Title" type="Label" parent="CenterContainer/VBoxContainer"]
 | 
			
		||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/Panel"]
 | 
			
		||||
layout_mode = 1
 | 
			
		||||
anchors_preset = 8
 | 
			
		||||
anchor_left = 0.5
 | 
			
		||||
anchor_top = 0.5
 | 
			
		||||
anchor_right = 0.5
 | 
			
		||||
anchor_bottom = 0.5
 | 
			
		||||
offset_left = -92.0
 | 
			
		||||
offset_top = -33.0
 | 
			
		||||
offset_right = 92.0
 | 
			
		||||
offset_bottom = 33.0
 | 
			
		||||
grow_horizontal = 2
 | 
			
		||||
grow_vertical = 2
 | 
			
		||||
 | 
			
		||||
[node name="Title" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
theme_override_font_sizes/font_size = 28
 | 
			
		||||
text = "You died"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
 | 
			
		||||
[node name="Caption" type="Label" parent="CenterContainer/VBoxContainer"]
 | 
			
		||||
[node name="Caption" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
 | 
			
		||||
layout_mode = 2
 | 
			
		||||
text = "Respawn in Next Round"
 | 
			
		||||
horizontal_alignment = 1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user