25 lines
No EOL
539 B
C#
25 lines
No EOL
539 B
C#
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);
|
|
}
|
|
}
|
|
} |