ProjectDDD/Assets/_Datas/SLShared/SLSystem/SLSystem.cs
2025-06-17 20:47:57 +09:00

41 lines
985 B (Stored with Git LFS)
C#

using System;
using Superlazy.Loader;
namespace Superlazy
{
public class SLSystem
{
public void Init(SLDataLoader loader, DateTime now)
{
Load(loader);
}
protected virtual void Load(SLDataLoader loader)
{
Data = SLEntity.Empty;
loader.Register(LoadJson);
SLLog.Info("Data Loaded");
}
protected virtual void LoadJson(string fileExt, string json)
{
if (fileExt == "json")
{
JsonLoader.LoadJson(Data, json);
}
else if (fileExt == "yaml")
{
YamlLoader.LoadYaml(Data, json);
}
}
public static SLEntity Data { get; private set; }
public static DateTime Now => DateTime.UtcNow;
//public static DateTime Now
//{
// get => SLDateTime.Now;
// private set => SLDateTime.Now = value;
//}
}
}