feat: Implement core game mechanics including player, enemies, bullets, HUD, and level setup.

This commit is contained in:
2025-11-21 13:18:53 +01:00
commit 245e3e141d
39 changed files with 823 additions and 0 deletions

98
scenes/hud.tscn Normal file
View File

@@ -0,0 +1,98 @@
[gd_scene load_steps=2 format=3 uid="uid://hud12345678"]
[ext_resource type="Script" path="res://scripts/hud.gd" id="1_hud"]
[node name="HUD" type="CanvasLayer"]
script = ExtResource("1_hud")
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="HealthBar" type="ProgressBar" parent="Control"]
layout_mode = 0
offset_left = 20.0
offset_top = 20.0
offset_right = 220.0
offset_bottom = 50.0
value = 100.0
[node name="AmmoContainer" type="VBoxContainer" parent="Control"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -150.0
offset_top = -80.0
offset_right = -20.0
offset_bottom = -20.0
grow_horizontal = 0
grow_vertical = 0
[node name="APLabel" type="Label" parent="Control/AmmoContainer"]
layout_mode = 2
text = "AP: 20"
horizontal_alignment = 2
[node name="HELabel" type="Label" parent="Control/AmmoContainer"]
layout_mode = 2
text = "HE: 10"
horizontal_alignment = 2
[node name="GameOverScreen" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="GameOverScreen"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.5)
[node name="Label" type="Label" parent="GameOverScreen"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -46.0
offset_top = -13.0
offset_right = 46.0
offset_bottom = 13.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 32
text = "GAME OVER"
[node name="RestartButton" type="Button" parent="GameOverScreen"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -48.0
offset_top = 40.0
offset_right = 48.0
offset_bottom = 71.0
grow_horizontal = 2
grow_vertical = 2
text = "Restart"
[connection signal="pressed" from="GameOverScreen/RestartButton" to="." method="_on_restart_button_pressed"]