Player health UI is bound to singleton

This commit is contained in:
karl committed 2020-02-01 12:22:18 +01:00
1 parent c8acaf0988
commit a773e5900d
6 files changed
+65 -6

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
extends Spatial
# Declare member variables here. Examples:
# var a: int = 2
# var b: String = "text"
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
InGameState.set_player_count(2)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta: float) -> void:
# pass
+7 -2
View File
@@ -1,7 +1,9 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://BodyParts/Arm.tscn" type="PackedScene" id=1]
[ext_resource path="res://UI/UI.tscn" type="PackedScene" id=2]
[ext_resource path="res://BodyParts/BodyBase/BodyBase.tscn" type="PackedScene" id=3]
[ext_resource path="res://Ingame/Ingame.gd" type="Script" id=4]
[sub_resource type="PlaneMesh" id=1]
size = Vector2( 10, 10 )
@@ -9,7 +11,8 @@ size = Vector2( 10, 10 )
[sub_resource type="BoxShape" id=2]
extents = Vector3( 5, 1, 5 )
[node name="Spatial" type="Spatial"]
[node name="InGame" type="Spatial"]
script = ExtResource( 4 )
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 )
@@ -38,4 +41,6 @@ key = 83
[node name="Arm" parent="Torso/FrontRight" index="1" instance=ExtResource( 1 )]
key = 65
[node name="UI" parent="." instance=ExtResource( 2 )]
[editable path="Torso"]