1
Fork 0
mirror of https://github.com/Steffo99/cinnos.git synced 2024-11-24 00:54:21 +00:00
This commit is contained in:
Steffo 2023-11-25 14:00:43 +01:00
parent 9a2db45d0e
commit c2373eaf9b
3 changed files with 36 additions and 2 deletions

12
GameTimer.gd Normal file
View file

@ -0,0 +1,12 @@
extends Node
class_name GameTimer
var current_time := 0.0
@onready var parent: Label = get_parent()
func _process(delta):
current_time += delta
parent.text = "%0.2f" % current_time

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=10 format=3 uid="uid://4whij2hmts0t"] [gd_scene load_steps=11 format=3 uid="uid://4whij2hmts0t"]
[ext_resource type="Script" path="res://Player.gd" id="1_wt4gx"] [ext_resource type="Script" path="res://Player.gd" id="1_wt4gx"]
[ext_resource type="Material" uid="uid://dondfiavgo2ws" path="res://Unshaded.material" id="2_upp15"] [ext_resource type="Material" uid="uid://dondfiavgo2ws" path="res://Unshaded.material" id="2_upp15"]
[ext_resource type="Script" path="res://GameTimer.gd" id="3_y362g"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_castg"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_castg"]
@ -60,4 +61,25 @@ shape = SubResource("BoxShape3D_2bm1d")
[node name="Camera3D" type="Camera3D" parent="."] [node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.955149, 0.296125, 0, -0.296125, 0.955149, 0, 2.66196, 3.33182) transform = Transform3D(1, 0, 0, 0, 0.955149, 0.296125, 0, -0.296125, 0.955149, 0, 2.66196, 3.33182)
[node name="Timer" type="Node" parent="."] [node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
[node name="Label" type="Label" parent="Control"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -81.0
offset_bottom = 26.0
grow_horizontal = 0
text = "Garasauto"
horizontal_alignment = 2
[node name="GameTimer" type="Node" parent="Control/Label"]
script = ExtResource("3_y362g")

Binary file not shown.