(client) feat:添加自定义瓦片和图片资源自定义加载 (#38)

Co-authored-by: zzdxxz <2079238449@qq.com>
Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
2025-07-17 15:42:24 +08:00
committed by TheRedApricot
parent ffeb65ba6b
commit 44cfb55985
42 changed files with 461 additions and 70 deletions

View File

@ -107,10 +107,19 @@ namespace Data
public PackAbout packAbout;
public string packID;
public string packRootPath;
public string Name
{
get
{
return packAbout.name;
}
}
public bool LoadPack(string packPath)
{
packRootPath=System.IO.Path.GetFullPath(packPath);;
var packDatas = ConfigProcessor.LoadXmlFromPath(packPath);
var aboutXmls = FindDocumentsWithRootName(packDatas, "About");
if (aboutXmls == null || aboutXmls.Count < 1)
@ -262,8 +271,12 @@ namespace Data
}
else
{
value = new DefineReference(field.FieldType.Name, element.Value, field.Name);
var reference = (Define)Activator.CreateInstance(field.FieldType);
reference.isReferene = true;
reference.description=field.FieldType.Name;
reference.label = field.Name;
reference.defName = element.Value;
value = reference;
}
}
else