Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- @export var time : int
- var countdownTimer = preload("res://Scenes/UI/Level_Countdown.tscn").instantiate()
- func _ready():
- countdownTimer.timerWaitTime = time
- %HUD.add_child(countdownTimer)
- var timerToConnect = countdownTimer.get_node("countdownTimer")
- match timerToConnect:
- false:
- print("Timer not found, did you spell the name right in the get_node arguement?")
- true:
- timerToConnect.connect("timeout", Callable(_onTimesUp()))
- func _onTimesUp():
- %Player.queue_free()
- %HUD.queue_free()
- var gameOverScreen : Label
- #TODO
Advertisement
Add Comment
Please, Sign In to add comment