add game director singleton with goto_room method

This commit is contained in:
yuki 2025-11-24 05:31:14 -03:00
parent f6cf980ac5
commit d4bf3241c5
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,9 @@
extends Node
func goto_room(previous_room: Room, waypoint: Waypoint) -> void:
print("changing rooms")
await previous_room.tree_exited
var next_room: Room = waypoint.to_scene.instantiate()
next_room.initial_spawn = waypoint.spawn_coordinates
get_tree().root.add_child(next_room)

View file

@ -0,0 +1 @@
uid://b4ydqderhu3mr