scene_manager.gd 445 B

12345678910111213141516171819
  1. extends Control
  2. enum EFFECT
  3. {
  4. NONE
  5. }
  6. const level_select : String = "res://scenes/level_select/level_select.tscn"
  7. func get_level(number: String) -> String:
  8. return "res://scenes/levels/level_" + number + ".tscn"
  9. func change_to_scene(path: String, effect: EFFECT = EFFECT.NONE) -> void:
  10. Display.reset()
  11. if path == "CURRENT":
  12. get_tree().call_deferred("reload_current_scene")
  13. else:
  14. get_tree().call_deferred("change_scene_to_file", path)