LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DunGen/RuntimeDungeon.cs
2023-12-22 18:30:10 -05:00

34 lines
518 B
C#

using UnityEngine;
namespace DunGen
{
[AddComponentMenu("DunGen/Runtime Dungeon")]
public class RuntimeDungeon : MonoBehaviour
{
public DungeonGenerator Generator = new DungeonGenerator();
public bool GenerateOnStart = true;
public GameObject Root;
protected virtual void Start()
{
if (GenerateOnStart)
{
Generate();
}
}
public void Generate()
{
if (Root != null)
{
Generator.Root = Root;
}
if (!Generator.IsGenerating)
{
Generator.Generate();
}
}
}
}