Added shield and score UI; player collision signal connected to enemy

This commit is contained in:
Henry 2025-12-07 09:54:50 +00:00
parent 996a0bb8f7
commit 8175e1469d
17 changed files with 321 additions and 15 deletions

35
scenes/ui.tscn Normal file
View file

@ -0,0 +1,35 @@
[gd_scene load_steps=5 format=3 uid="uid://k0yw686ys6ug"]
[ext_resource type="Script" uid="uid://dv6s1gx40k0v1" path="res://scenes/ui.gd" id="1_gdt2y"]
[ext_resource type="Texture2D" uid="uid://dkv6xa8ir2j27" path="res://resources/bar_background.png" id="1_x4jx1"]
[ext_resource type="Texture2D" uid="uid://cs0do05fosv40" path="res://resources/bar_foreground.png" id="2_yev5y"]
[ext_resource type="PackedScene" uid="uid://b3rcs8xlsvm02" path="res://scenes/score_counter.tscn" id="4_wm3ai"]
[node name="UI" type="MarginContainer"]
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 10.0
grow_horizontal = 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
script = ExtResource("1_gdt2y")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="ShieldBar" type="TextureProgressBar" parent="HBoxContainer"]
custom_minimum_size = Vector2(80, 16)
layout_mode = 2
value = 100.0
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
texture_under = ExtResource("1_x4jx1")
texture_progress = ExtResource("2_yev5y")
[node name="ScoreCounter" parent="HBoxContainer" instance=ExtResource("4_wm3ai")]
layout_mode = 2