before planets
This commit is contained in:
parent
bb6404e918
commit
e09f05b566
57 changed files with 1203 additions and 90 deletions
47
entities/gameUI/gameUI.tscn
Normal file
47
entities/gameUI/gameUI.tscn
Normal file
|
@ -0,0 +1,47 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bbl6ouj0ew23c"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cxju8eq6w5rbt" path="res://entities/gameUI/game_ui.gd" id="1_fyng4"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dyfwkfdm7affw" path="res://fonts/ui_label_set.tres" id="2_4gmqh"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c33hoau8vc0q7" path="res://fonts/little_label_settings.tres" id="3_oo04r"]
|
||||
|
||||
[node name="GameUi" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_fyng4")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -192.0
|
||||
offset_top = 30.0
|
||||
offset_right = -46.0
|
||||
offset_bottom = 112.0
|
||||
grow_horizontal = 0
|
||||
|
||||
[node name="LapLabel" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Lap 1/3"
|
||||
label_settings = ExtResource("2_4gmqh")
|
||||
|
||||
[node name="TimeLabel" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "57 s"
|
||||
label_settings = ExtResource("2_4gmqh")
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
offset_right = 147.0
|
||||
offset_bottom = 66.0
|
||||
|
||||
[node name="LapLabel" type="Label" parent="VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Press
|
||||
C to respawn
|
||||
R to restart"
|
||||
label_settings = ExtResource("3_oo04r")
|
20
entities/gameUI/game_ui.gd
Normal file
20
entities/gameUI/game_ui.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
extends Control
|
||||
class_name GameUI
|
||||
|
||||
var time : float
|
||||
var lap : int
|
||||
|
||||
@onready var lap_label: Label = $VBoxContainer/LapLabel
|
||||
@onready var time_label: Label = $VBoxContainer/TimeLabel
|
||||
|
||||
func _ready():
|
||||
time = 0
|
||||
lap = 0.0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time += delta
|
||||
lap_label.text = "Lap " + str(lap) + "/3"
|
||||
time_label.text = str(round(time*100)/100)
|
||||
|
||||
func _on_check_point_manager_new_lap(value: Variant) -> void:
|
||||
lap = value
|
1
entities/gameUI/game_ui.gd.uid
Normal file
1
entities/gameUI/game_ui.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cxju8eq6w5rbt
|
Loading…
Add table
Add a link
Reference in a new issue