feat: added clock
This commit is contained in:
parent
c422a83f59
commit
c5dcf3d9d1
9 changed files with 103 additions and 1 deletions
14
scenes/clock/clock.gd
Normal file
14
scenes/clock/clock.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
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]
|
Loading…
Add table
Add a link
Reference in a new issue