(client) feat:添加自定义瓦片和图片资源自定义加载 (#38)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user