42 lines
887 B

extends CanvasLayer
# Will notify Main node that start button has been pressed.
signal start_game
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
func show_message(text):
$Message.text = text
func show_game_over():
show_message("Game Over")
# Wait until timer has counted down.
await $MessageTimer.timeout
$Message.text = "Dodge the\nCreeps!"
# Make a one-shot timer and wait for it to finish.
await get_tree().create_timer(1.0).timeout
func update_score(score):
$ScoreLabel.text = str(score)
func _on_message_timer_timeout():
func _on_start_button_pressed():