(client) feat:添加瓦片动态定义和资源动态加载
This commit is contained in:
@ -107,10 +107,11 @@ namespace Data
|
||||
|
||||
public PackAbout packAbout;
|
||||
public string packID;
|
||||
|
||||
public string packRootPath;
|
||||
|
||||
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)
|
||||
|
@ -46,11 +46,6 @@ namespace Data
|
||||
}
|
||||
}
|
||||
|
||||
public class ImageDef : Define
|
||||
{
|
||||
public string path;
|
||||
public int wCount;
|
||||
public int hCount;
|
||||
}
|
||||
|
||||
|
||||
}
|
20
Client/Assets/Scripts/Data/ResourcesDefine.cs
Normal file
20
Client/Assets/Scripts/Data/ResourcesDefine.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
public class ImageDef : Define
|
||||
{
|
||||
public string name;
|
||||
public string path;
|
||||
public int wCount;
|
||||
public int hCount;
|
||||
public int pixelsPerUnit = 16;
|
||||
|
||||
public override bool Init(XElement xmlDef)
|
||||
{
|
||||
base.Init(xmlDef);
|
||||
name = defName;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/Data/ResourcesDefine.cs.meta
Normal file
3
Client/Assets/Scripts/Data/ResourcesDefine.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8988509c3c0f4525871f5ccd7ef28363
|
||||
timeCreated: 1752672894
|
Reference in New Issue
Block a user