Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *control node then label node as child*
- extends Control
- var timer
- export var wait_time = 3
- var label
- func _ready():
- set_process(true)
- timer = Timer.new()
- add_child(timer)
- timer.set_wait_time(wait_time)
- timer.set_one_shot(true)
- timer.connect('timeout',self,"pt")
- timer.start()
- label = get_node("Label")
- pass
- func _process(delta):
- label.set_text(str(timer.get_time_left()))
- func pt():
- print("over")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement