extends Button

var current_scene
var next_scene

func _on_pressed() -> void:
	current_scene = self.get_parent().get_parent().get_parent()
	
	if current_scene.game_mode == "cascade":
		pass
	elif current_scene.game_mode == "comet":
		$ButtonPress.play()
		await $ButtonPress.finished
		next_scene = load("res://scenes/game/comet_zap.tscn").instantiate()
		next_scene.word_set = self.text.to_lower().replace(" ", "")
		get_tree().change_scene_to_node(next_scene)
		
