1
Fork 0
mirror of https://github.com/Steffo99/cinnos.git synced 2024-11-21 23:54:20 +00:00
cinnos/GameTimer.gd

20 lines
310 B
GDScript3
Raw Normal View History

2023-11-25 13:00:43 +00:00
extends Node
class_name GameTimer
var current_time := 0.0
2023-11-25 20:29:45 +00:00
var stopped: bool = false
2023-11-25 13:00:43 +00:00
@onready var parent: Label = get_parent()
func _process(delta):
2023-11-25 20:29:45 +00:00
if not stopped:
current_time += delta
parent.text = "%0.2f" % current_time
func _on_dialog_6_body_entered(body):
if body is Player:
stopped = true