Update bee animations, game over component UI, and game state handling. Set up game over conditions based on the number of dead bees.

This commit is contained in:
Dan 2024-05-11 16:09:57 +01:00
parent 2a4a578f19
commit f4e2169009
11 changed files with 203 additions and 37 deletions

71
ui/GameOverComponent.tscn Normal file
View file

@ -0,0 +1,71 @@
[gd_scene load_steps=2 format=3 uid="uid://b5whit1dshr3"]
[ext_resource type="Script" path="res://ui/scripts/game_over_component.gd" id="1_p4mrd"]
[node name="GameOverComponent" 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_p4mrd")
[node name="BackgroundOverlay" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="CenterContainer" type="CenterContainer" parent="MarginContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer"]
layout_mode = 2
[node name="NotCool" type="Label" parent="MarginContainer/CenterContainer/VBoxContainer"]
layout_mode = 2
tooltip_text = "Valheim is a great game."
mouse_filter = 0
theme_override_colors/font_color = Color(0.819608, 0.454902, 0.254902, 1)
theme_override_font_sizes/font_size = 30
text = "Sucking at something is the
first step towards being
kinda good at something.
Try again."
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/CenterContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer"]
layout_mode = 2
[node name="TryAgain" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
text = "Try Again"
[node name="MainMenu" type="Button" parent="MarginContainer/CenterContainer/VBoxContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Main Menu"