(client) chore: Rearrange script structures
This commit is contained in:
26
Client/Assets/Scripts/Managers/DefineManager.cs
Normal file
26
Client/Assets/Scripts/Managers/DefineManager.cs
Normal file
@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/Managers/DefineManager.cs.meta
Normal file
3
Client/Assets/Scripts/Managers/DefineManager.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b521fe6d2648423e818beda6d4a3c007
|
||||
timeCreated: 1752148078
|
Reference in New Issue
Block a user