Menu de inicio, nuevo nivel y ajustes en objetos

This commit is contained in:
Diego De la Viuda Llorente committed 2026-10-29 16:39:46 +01:00
1 parent cd9f31c8c1
commit 827e16cf50
61 files changed
+2685 -3553

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
extends Area2D
## Salida provisional: vuelve al menu, sin desbloqueos ni seleccion de personaje.
## Su cartel y su forma se pueden editar en la escena reutilizable.
var _triggered: bool = false
func _ready() -> void:
body_entered.connect(_on_body_entered)
func _on_body_entered(body: Node2D) -> void:
if _triggered or not body.is_in_group("player"):
return
_triggered = true
call_deferred("_return_to_menu")
func _return_to_menu() -> void:
var error: Error = get_tree().change_scene_to_file("res://ui/menu/main_menu.tscn")
if error != OK:
_triggered = false
push_error("No se pudo abrir el menu desde la salida: " + error_string(error))