extends Node

onready var player = get_tree().get_nodes_in_group("player")[0]

func _ready():
	player.connect("starved_to_death", self, "_on_player_starved_to_death")

func _on_player_starved_to_death():
	var node = Dialogic.start("starve")
	node.pause_mode = PAUSE_MODE_PROCESS
	add_child(node)
	get_tree().paused = true
	yield(node, "timeline_end")
	get_tree().paused = false
	get_tree().quit() # go back to main menu when such a thing exists
