feat(*): Add hud with timer

This commit is contained in:
Josh Creek
2025-07-13 18:36:48 +01:00
parent bdd0244873
commit 5ad381cf2f
7 changed files with 66 additions and 23 deletions
+4 -7
View File
@@ -1,8 +1,8 @@
[gd_scene load_steps=10 format=3 uid="uid://b82sy3js0vncb"]
[ext_resource type="Script" uid="uid://bpxm8ge52w5g8" path="res://scripts/game.gd" id="1_iywne"]
[ext_resource type="Material" uid="uid://drm3clvqpis42" path="res://assets/models/TerrainMaterial.tres" id="1_lnu2h"]
[ext_resource type="ArrayMesh" uid="uid://cndcxj6gf0smr" path="res://assets/models/Terrain.obj" id="2_lbhrr"]
[ext_resource type="Script" uid="uid://bj4jfixb8xuni" path="res://scripts/time_left_label.gd" id="3_iywne"]
[ext_resource type="PackedScene" uid="uid://p07epxnh8wwp" path="res://objects/ship.tscn" id="4_iywne"]
[ext_resource type="PackedScene" uid="uid://27u3tdc5yqnl" path="res://objects/ball.tscn" id="5_iywne"]
@@ -19,6 +19,7 @@ background_mode = 2
sky = SubResource("Sky_gl6un")
[node name="Game" type="Node3D"]
script = ExtResource("1_iywne")
[node name="Terrain" type="StaticBody3D" parent="."]
@@ -36,11 +37,7 @@ shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_j5yw3")
[node name="TimeLeftLabel" type="Label3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.788399, 1.27559, -2.74564)
script = ExtResource("3_iywne")
[node name="TimeLeftTimer" type="Timer" parent="."]
[node name="Timer" type="Timer" parent="."]
process_callback = 0
autostart = true
@@ -51,4 +48,4 @@ lock_rotation = true
[node name="Ball" parent="." instance=ExtResource("5_iywne")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18.2942, 1.46401, -2.82393)
[connection signal="timeout" from="TimeLeftTimer" to="TimeLeftLabel" method="_on_time_left_timer_timeout"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]