extends TextureButton # Called when the node enters the scene tree for the first time. func _ready(): pressed.connect(self._button_pressed) var was_hovered = false func _process(delta): if is_hovered() && !was_hovered: Sounds.get_node("hover").play() was_hovered = is_hovered() # Called every frame. 'delta' is the elapsed time since the previous frame. func _button_pressed(): Sounds.get_node("click").play() get_tree().quit()