1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2024-11-22 04:34:19 +00:00

Create basic health bar HUD

This commit is contained in:
Steffo 2022-04-03 08:19:33 +02:00
parent 768f677072
commit 62220e1126
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 15 additions and 1 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://src/mechanics/Background.tscn" type="PackedScene" id=1]
[ext_resource path="res://src/mechanics/Darkness.tscn" type="PackedScene" id=2]
@ -13,6 +13,7 @@
[ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11]
[ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=12]
[ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=13]
[ext_resource path="res://src/ui/HealthBar.tscn" type="PackedScene" id=14]
[node name="Game" type="Node2D"]
script = ExtResource( 6 )
@ -94,3 +95,6 @@ margin_top = -80.0
margin_right = 640.0
[node name="TimeSurvived" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 7 )]
[node name="HealthBar" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 14 )]
margin_left = 14.0

10
src/ui/HealthBar.tscn Normal file
View file

@ -0,0 +1,10 @@
[gd_scene format=2]
[node name="HealthBar" type="ProgressBar"]
anchor_top = 0.5
anchor_bottom = 0.5
margin_top = -14.0
margin_right = 320.0
margin_bottom = 14.0
step = 1.0
value = 50.0