mirror of
https://github.com/soarqin/DSP_Mods_TO.git
synced 2025-12-22 06:23:33 +08:00
add XianTu
This commit is contained in:
35
XianTu/Scripts/DataController/BlueTuDatabase.cs
Normal file
35
XianTu/Scripts/DataController/BlueTuDatabase.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XianTu.Scripts.DataController
|
||||
{
|
||||
internal static class BlueTuDatabase
|
||||
{
|
||||
public static BlueprintData Load(string path)
|
||||
{
|
||||
var flag = !path.EndsWith(".txt");
|
||||
if (flag)
|
||||
{
|
||||
path += ".txt";
|
||||
}
|
||||
var text = Singleton<LoadManager>.Instance.LoadText(path);
|
||||
var flag2 = text == "";
|
||||
BlueprintData blueprintData;
|
||||
if (flag2)
|
||||
{
|
||||
Debug.Log("没有找到蓝图文件");
|
||||
blueprintData = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var blueprintData2 = BlueprintData.CreateNew(text);
|
||||
var flag3 = blueprintData2 == null;
|
||||
if (flag3)
|
||||
{
|
||||
Debug.Log("蓝图文件加载失败");
|
||||
}
|
||||
blueprintData = blueprintData2;
|
||||
}
|
||||
return blueprintData;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user