From 241c0bc37739584ddea6f1744764c4cd432a15c6 Mon Sep 17 00:00:00 2001 From: Cookie-CHR Date: Mon, 4 Apr 2022 12:43:04 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20put=20sprites=20on=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/levels/Game.tscn | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/levels/Game.tscn b/src/levels/Game.tscn index f8b1eca..24c9f32 100644 --- a/src/levels/Game.tscn +++ b/src/levels/Game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=17 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] @@ -6,8 +6,12 @@ [ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4] [ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5] [ext_resource path="res://src/levels/Game.gd" type="Script" id=6] +[ext_resource path="res://src/ui/UIBar.png" type="Texture" id=7] [ext_resource path="res://src/ui/TheDarkNightUI.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/ui/LifeBarFg.png" type="Texture" id=9] +[ext_resource path="res://src/ui/LifeBarBg.png" type="Texture" id=10] [ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11] +[ext_resource path="res://src/ui/Music_on.png" type="Texture" id=12] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] @@ -88,13 +92,16 @@ margin_right = 0.0 anchor_right = 1.0 anchor_bottom = 1.0 +[node name="UIBar" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel"] +position = Vector2( 640, 40 ) +texture = ExtResource( 7 ) + [node name="TimeSurvived" type="Label" parent="UserInterface/TheDarkNightUI/Panel"] -anchor_left = 1.0 -anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 14.0 -margin_right = -14.0 -margin_bottom = -14.0 +margin_left = 600.0 +margin_top = 16.0 +margin_right = 680.0 +margin_bottom = -12.0 grow_horizontal = 0 grow_vertical = 2 text = "00:00.000" @@ -103,6 +110,7 @@ valign = 1 script = SubResource( 1 ) [node name="HealthBar" type="ProgressBar" parent="UserInterface/TheDarkNightUI/Panel"] +visible = false anchor_bottom = 1.0 margin_left = 14.0 margin_top = 14.0 @@ -111,4 +119,28 @@ margin_bottom = -14.0 grow_vertical = 2 value = 50.0 +[node name="TextureProgress" type="TextureProgress" parent="UserInterface/TheDarkNightUI/Panel"] +margin_left = 15.0 +margin_top = 15.0 +margin_right = 317.0 +margin_bottom = -15.0 +value = 50.0 +texture_under = ExtResource( 10 ) +texture_progress = ExtResource( 9 ) +texture_progress_offset = Vector2( 10, 5 ) + +[node name="Button" type="Button" parent="UserInterface/TheDarkNightUI/Panel"] +anchor_left = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = -100.0 +margin_top = 10.0 +margin_right = -50.0 +margin_bottom = -10.0 +flat = true + +[node name="Sprite" type="Sprite" parent="UserInterface/TheDarkNightUI/Panel/Button"] +position = Vector2( 25, 30 ) +texture = ExtResource( 12 ) + [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"]