public void OnRoomEnter(RoomInstanceGrid2D roomInstance)
        {
            nextCurrentRoom = roomInstance;

            if (currentRoom == null)
            {
                currentRoom     = nextCurrentRoom;
                nextCurrentRoom = null;
                UpdateCurrentRoomInfo();
            }
        }
        public override void LoadNextLevel()
        {
            currentRoom     = null;
            nextCurrentRoom = null;

            // Show loading screen
            ShowLoadingScreen("Example 1", "loading..");

            // Find the generator runner
            var generator = GameObject.Find("Dungeon Generator").GetComponent <DungeonGeneratorGrid2D>();

            // Start the generator coroutine
            StartCoroutine(GeneratorCoroutine(generator));
        }
 public void OnRoomLeave(RoomInstanceGrid2D roomInstance)
 {
     currentRoom     = nextCurrentRoom;
     nextCurrentRoom = null;
     UpdateCurrentRoomInfo();
 }