Implemented dungeon selector

This commit is contained in:
Max 2025-03-03 16:22:19 +01:00
parent 514d985ddb
commit aeeb15cb12
46 changed files with 26355 additions and 32 deletions

View file

@ -0,0 +1,25 @@
using System;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace DungeonSelection
{
public class DungeonLoader : MonoBehaviour
{
private void OnEnable()
{
GameEvents.LoadDungeon += LoadDungeon;
}
private void OnDisable()
{
GameEvents.LoadDungeon -= LoadDungeon;
}
public static void LoadDungeon(DungeonData dungeonData)
{
SceneManager.LoadScene(dungeonData.SceneName);
}
}
}