La-Torreta-del-Drac/scenes/clock/clock.gd
2025-04-09 18:43:34 +02:00

14 lines
316 B
GDScript

extends Label
func _process(delta: float) -> void:
var time: Dictionary = Time.get_time_dict_from_system()
var hour: int = time['hour']
var minute: int = time['minute']
var second: int = time['second']
if second % 2 == 0:
text = "%02d:%02d" % [hour, minute]
else:
text = "%02d %02d" % [hour, minute]