Explorar o código

:sparkle: Clean code

DricomDragon %!s(int64=2) %!d(string=hai) anos
pai
achega
4be0df9a95
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      godot/component/entity/level/Level.gd

+ 4 - 1
godot/component/entity/level/Level.gd

@@ -1,6 +1,9 @@
 extends Node2D
 
 
+const MENU_FILE: String = "res://run/menu.tscn"
+
+
 func _input(event: InputEvent) -> void:
 	if event.is_action_pressed("ui_cancel"):
-		get_tree().change_scene_to_packed(load("res://run/menu.tscn"))
+		get_tree().change_scene_to_file(MENU_FILE)