mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-19 23:37:13 +08:00
26 lines
757 B
C#
26 lines
757 B
C#
|
|
using System.Collections.Generic;
|
||
|
|
using System.IO;
|
||
|
|
using Data;
|
||
|
|
using Utils;
|
||
|
|
|
||
|
|
namespace Managers
|
||
|
|
{
|
||
|
|
public class DefineManager : Singleton<DefineManager>
|
||
|
|
{
|
||
|
|
private const string coreNamespace = "Data";
|
||
|
|
private static readonly string[] dataSetFilePath = { "Data", "Mod" };
|
||
|
|
|
||
|
|
public Dictionary<string, Dictionary<string, Define>> defines = new();
|
||
|
|
public Dictionary<string, DefinePack> packs = new();
|
||
|
|
|
||
|
|
public void Init()
|
||
|
|
{
|
||
|
|
var packFolder = Directory.GetDirectories(dataSetFilePath[0]);
|
||
|
|
foreach (var folder in packFolder)
|
||
|
|
{
|
||
|
|
var pack = new DefinePack();
|
||
|
|
if (pack.LoadPack(folder)) packs.Add(pack.packID, pack);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|