From 07af547a9cc763c318d02ef2a915fc8525fb71a3 Mon Sep 17 00:00:00 2001 From: freddie-a <57713959+freddie-a@users.noreply.github.com> Date: Sat, 29 Oct 2022 14:30:10 +0100 Subject: Add UI --- Node2D.tscn | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/Node2D.tscn b/Node2D.tscn index c4b47a3..bbfd349 100644 --- a/Node2D.tscn +++ b/Node2D.tscn @@ -5,16 +5,53 @@ [sub_resource type="CircleShape2D" id=1] -[node name="Node2D" type="Node2D"] -position = Vector2( 46, 10 ) +[node name="Node" type="Node"] -[node name="KinematicBody2D" type="KinematicBody2D" parent="."] +[node name="Node2D" type="Node2D" parent="."] + +[node name="KinematicBody2D" type="KinematicBody2D" parent="Node2D"] position = Vector2( 149, 52 ) input_pickable = true script = ExtResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Node2D/KinematicBody2D"] shape = SubResource( 1 ) -[node name="Sprite" type="Sprite" parent="KinematicBody2D/CollisionShape2D"] +[node name="Sprite" type="Sprite" parent="Node2D/KinematicBody2D/CollisionShape2D"] +position = Vector2( -15.5, -15 ) +scale = Vector2( 0.515625, 0.53125 ) texture = ExtResource( 1 ) + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = -14.0 +custom_constants/separation = 10 +alignment = 2 + +[node name="Label" type="Label" parent="HBoxContainer"] +margin_right = 46.0 +margin_bottom = 14.0 +text = "Health:" +align = 2 + +[node name="ProgressBar" type="ProgressBar" parent="HBoxContainer"] +margin_left = 56.0 +margin_right = 949.0 +margin_bottom = 14.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +value = 50.0 + +[node name="Label2" type="Label" parent="HBoxContainer"] +margin_left = 959.0 +margin_right = 1006.0 +margin_bottom = 14.0 +text = "Money:" + +[node name="Label3" type="Label" parent="HBoxContainer"] +margin_left = 1016.0 +margin_right = 1024.0 +margin_bottom = 14.0 +text = "0" -- cgit v1.2.3-70-g09d2