From b91678f5b20686172b183a9d17fe898538647a9f Mon Sep 17 00:00:00 2001 From: Mikhail Aristov <12281487+MikhailAristov@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:31:58 +0100 Subject: [PATCH] extract score overlay to prefab --- godot/i18n/translation.csv | 2 +- godot/i18n/translation.de.translation | Bin 1097 -> 1097 bytes godot/i18n/translation.en.translation | Bin 1054 -> 1062 bytes godot/scenes/crowd/crowd.tscn | 44 +++++++++---------- godot/scenes/ingame_scene.tscn | 58 ++++---------------------- godot/scenes/score_overlay.tscn | 48 +++++++++++++++++++++ 6 files changed, 79 insertions(+), 73 deletions(-) create mode 100644 godot/scenes/score_overlay.tscn diff --git a/godot/i18n/translation.csv b/godot/i18n/translation.csv index 9d51207..4b2cd55 100644 --- a/godot/i18n/translation.csv +++ b/godot/i18n/translation.csv @@ -15,5 +15,5 @@ settings_volume_sound,Sound Volume,Sound Lautstärke settings_language,Game Language,Spielsprache game_paused,Game paused,Spiel pausiert resume_game,Resume game,Weiterspielen -game_over,Show over,Show vorbei +game_over,That's a wrap!,Das war's! your_score,Your score:,Deine Punkte: \ No newline at end of file diff --git a/godot/i18n/translation.de.translation b/godot/i18n/translation.de.translation index 00e50af745755f3f5a2c07f1ff969f3d1c22e6c3..94ed5d791abc9aa62823f8471f024cd93b48b820 100644 GIT binary patch delta 39 vcmX@fagt+$G$X5ViE(n_WCg~rjNF^WnE05uToQ{F$`gy!ixns9u}A{|=gJD% delta 39 vcmX@fagt+$G$X4)Qj$U9WCg~rj69pgnE05u{sr%LWXRQu;rKUMk3|{)?tTlp diff --git a/godot/i18n/translation.en.translation b/godot/i18n/translation.en.translation index 6407c1e3e5e0e4c97dda6353516542fe91f787ae..5a51804b4448c18c3cc949d795245e6dfe4eb031 100644 GIT binary patch delta 78 zcmbQov5aGbG$U(fexiZFWCg}Yth@{i4E&qfnfMtQk53k7)@Hmo*_nBtYRJBS>T67! fZ2mJUGW?6YVOOg7pV11alz|i@XvM$|RL2O!LBT=J0KR4uVgLXD diff --git a/godot/scenes/crowd/crowd.tscn b/godot/scenes/crowd/crowd.tscn index d681e30..7c82107 100644 --- a/godot/scenes/crowd/crowd.tscn +++ b/godot/scenes/crowd/crowd.tscn @@ -8,126 +8,126 @@ position = Vector2(240, 232) script = ExtResource("1_y7wyj") -[node name="Tables" type="Node" parent="."] +[node name="Tables" type="Node2D" parent="."] [node name="Table_1" type="Sprite2D" parent="Tables"] z_index = 35 -position = Vector2(170, 199) +position = Vector2(-70, -33) scale = Vector2(0.25, 0.25) texture = ExtResource("2_bax5s") [node name="Table_2" type="Sprite2D" parent="Tables"] z_index = 25 -position = Vector2(359, 138) +position = Vector2(119, -94) scale = Vector2(0.25, 0.25) texture = ExtResource("2_bax5s") [node name="Table_3" type="Sprite2D" parent="Tables"] z_index = 15 -position = Vector2(203, 84) +position = Vector2(-37, -148) scale = Vector2(0.25, 0.25) texture = ExtResource("2_bax5s") [node name="Table_4" type="Sprite2D" parent="Tables"] z_index = 45 -position = Vector2(319, 230) +position = Vector2(79, -2) scale = Vector2(0.25, 0.25) texture = ExtResource("2_bax5s") -[node name="Seats" type="Node" parent="."] +[node name="Seats" type="Node2D" parent="."] [node name="Seat_5" type="Node2D" parent="Seats"] z_index = 10 -position = Vector2(205, 35) +position = Vector2(-35, -197) [node name="Chair" parent="Seats/Seat_5" instance=ExtResource("3_y4hpm")] [node name="Seat_6" type="Node2D" parent="Seats"] z_index = 12 -position = Vector2(159, 79) +position = Vector2(-81, -153) [node name="Chair" parent="Seats/Seat_6" instance=ExtResource("3_y4hpm")] [node name="Seat_7" type="Node2D" parent="Seats"] z_index = 13 -position = Vector2(249, 81) +position = Vector2(9, -151) [node name="Chair" parent="Seats/Seat_7" instance=ExtResource("3_y4hpm")] [node name="Seat_8" type="Node2D" parent="Seats"] z_index = 17 -position = Vector2(204, 130) +position = Vector2(-36, -102) [node name="Chair" parent="Seats/Seat_8" instance=ExtResource("3_y4hpm")] [node name="Seat_9" type="Node2D" parent="Seats"] z_index = 20 -position = Vector2(359, 94) +position = Vector2(119, -138) [node name="Chair" parent="Seats/Seat_9" instance=ExtResource("3_y4hpm")] [node name="Seat_10" type="Node2D" parent="Seats"] z_index = 22 -position = Vector2(311, 137) +position = Vector2(71, -95) [node name="Chair" parent="Seats/Seat_10" instance=ExtResource("3_y4hpm")] [node name="Seat_11" type="Node2D" parent="Seats"] z_index = 23 -position = Vector2(401, 133) +position = Vector2(161, -99) [node name="Chair" parent="Seats/Seat_11" instance=ExtResource("3_y4hpm")] [node name="Seat_12" type="Node2D" parent="Seats"] z_index = 26 -position = Vector2(359, 184) +position = Vector2(119, -48) [node name="Chair" parent="Seats/Seat_12" instance=ExtResource("3_y4hpm")] [node name="Seat_1" type="Node2D" parent="Seats"] z_index = 30 -position = Vector2(168, 156) +position = Vector2(-72, -76) [node name="Chair" parent="Seats/Seat_1" instance=ExtResource("3_y4hpm")] [node name="Seat_2" type="Node2D" parent="Seats"] z_index = 32 -position = Vector2(122, 197) +position = Vector2(-118, -35) [node name="Chair" parent="Seats/Seat_2" instance=ExtResource("3_y4hpm")] [node name="Seat_3" type="Node2D" parent="Seats"] z_index = 33 -position = Vector2(217, 199) +position = Vector2(-23, -33) [node name="Chair" parent="Seats/Seat_3" instance=ExtResource("3_y4hpm")] [node name="Seat_4" type="Node2D" parent="Seats"] z_index = 36 -position = Vector2(166, 244) +position = Vector2(-74, 12) [node name="Chair" parent="Seats/Seat_4" instance=ExtResource("3_y4hpm")] [node name="Seat_13" type="Node2D" parent="Seats"] z_index = 40 -position = Vector2(315, 187) +position = Vector2(75, -45) [node name="Chair" parent="Seats/Seat_13" instance=ExtResource("3_y4hpm")] [node name="Seat_14" type="Node2D" parent="Seats"] z_index = 42 -position = Vector2(276, 232) +position = Vector2(36, 0) [node name="Chair" parent="Seats/Seat_14" instance=ExtResource("3_y4hpm")] [node name="Seat_15" type="Node2D" parent="Seats"] z_index = 43 -position = Vector2(366, 231) +position = Vector2(126, -1) [node name="Chair" parent="Seats/Seat_15" instance=ExtResource("3_y4hpm")] [node name="Seat_16" type="Node2D" parent="Seats"] z_index = 46 -position = Vector2(320, 274) +position = Vector2(80, 42) [node name="Chair" parent="Seats/Seat_16" instance=ExtResource("3_y4hpm")] diff --git a/godot/scenes/ingame_scene.tscn b/godot/scenes/ingame_scene.tscn index 1f54eb4..a3b1861 100644 --- a/godot/scenes/ingame_scene.tscn +++ b/godot/scenes/ingame_scene.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://cik30de5gaaah"] +[gd_scene load_steps=7 format=3 uid="uid://cik30de5gaaah"] [ext_resource type="Script" path="res://scenes/ingame_scene.gd" id="1_objyc"] [ext_resource type="PackedScene" uid="uid://bkk87o2ooo6at" path="res://ui/overlays/fade_overlay.tscn" id="1_y6ebv"] [ext_resource type="PackedScene" uid="uid://jyv4g54adkmo" path="res://ui/overlays/pause_overlay.tscn" id="3_8o178"] +[ext_resource type="PackedScene" uid="uid://b0xc4jjyahlvk" path="res://scenes/score_overlay.tscn" id="3_yvlw3"] [ext_resource type="PackedScene" uid="uid://bx6htkgx23t8v" path="res://scenes/crowd/crowd.tscn" id="4_aeh13"] [ext_resource type="PackedScene" uid="uid://cicyfp5xjvvu4" path="res://scenes/stage.tscn" id="5_borcq"] @@ -15,63 +16,20 @@ script = ExtResource("1_objyc") unique_name_in_owner = true visible = false +[node name="ScoreOverlay" parent="UI" instance=ExtResource("3_yvlw3")] +unique_name_in_owner = true +visible = false + [node name="PauseOverlay" parent="UI" instance=ExtResource("3_8o178")] unique_name_in_owner = true process_mode = 2 visible = false -[node name="ScoreOverlay" type="CenterContainer" parent="UI"] -unique_name_in_owner = true -process_mode = 2 -visible = false -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="VBoxContainer3" type="VBoxContainer" parent="UI/ScoreOverlay"] -layout_mode = 2 - -[node name="Label" type="Label" parent="UI/ScoreOverlay/VBoxContainer3"] -layout_mode = 2 -theme_type_variation = &"HeaderLarge" -text = "game_over" -horizontal_alignment = 1 - -[node name="LabelScore" type="Label" parent="UI/ScoreOverlay/VBoxContainer3"] -layout_mode = 2 -theme_type_variation = &"HeaderLarge" -text = "your_score" -horizontal_alignment = 1 - -[node name="FinalScore" type="Label" parent="UI/ScoreOverlay/VBoxContainer3"] -unique_name_in_owner = true -layout_mode = 2 -theme_type_variation = &"HeaderLarge" -text = "100" -horizontal_alignment = 1 - -[node name="MenuContainer" type="VBoxContainer" parent="UI/ScoreOverlay/VBoxContainer3"] -unique_name_in_owner = true -layout_mode = 2 -theme_override_constants/separation = 8 - -[node name="MainMenuButton" type="Button" parent="UI/ScoreOverlay/VBoxContainer3/MenuContainer"] -unique_name_in_owner = true -custom_minimum_size = Vector2(180, 0) -layout_mode = 2 -size_flags_horizontal = 4 -text = "new_game" - -[node name="ExitButton" type="Button" parent="UI/ScoreOverlay/VBoxContainer3/MenuContainer"] -unique_name_in_owner = true -layout_mode = 2 -text = "leave_game" - [node name="Crowd" parent="." instance=ExtResource("4_aeh13")] +visible = false position = Vector2(0, 0) [node name="Stage" parent="." instance=ExtResource("5_borcq")] +visible = false z_index = 10 position = Vector2(291, 346) diff --git a/godot/scenes/score_overlay.tscn b/godot/scenes/score_overlay.tscn new file mode 100644 index 0000000..0de51b8 --- /dev/null +++ b/godot/scenes/score_overlay.tscn @@ -0,0 +1,48 @@ +[gd_scene format=3 uid="uid://b0xc4jjyahlvk"] + +[node name="ScoreOverlay" type="CenterContainer"] +process_mode = 2 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="VBoxContainer3" type="VBoxContainer" parent="."] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer3"] +layout_mode = 2 +theme_type_variation = &"HeaderLarge" +text = "game_over" +horizontal_alignment = 1 + +[node name="LabelScore" type="Label" parent="VBoxContainer3"] +layout_mode = 2 +theme_type_variation = &"HeaderLarge" +text = "your_score" +horizontal_alignment = 1 + +[node name="FinalScore" type="Label" parent="VBoxContainer3"] +unique_name_in_owner = true +layout_mode = 2 +theme_type_variation = &"HeaderLarge" +text = "0" +horizontal_alignment = 1 + +[node name="MenuContainer" type="VBoxContainer" parent="VBoxContainer3"] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 8 + +[node name="MainMenuButton" type="Button" parent="VBoxContainer3/MenuContainer"] +unique_name_in_owner = true +custom_minimum_size = Vector2(180, 0) +layout_mode = 2 +size_flags_horizontal = 4 +text = "new_game" + +[node name="ExitButton" type="Button" parent="VBoxContainer3/MenuContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "leave_game"