为默认PNG引擎增加识别标准

This commit is contained in:
ZouJin 2024-06-03 23:45:21 +08:00
parent fbfc40f5eb
commit 3f68b42b85
2 changed files with 11 additions and 0 deletions

View File

@ -85,6 +85,15 @@ namespace VPet_Simulator.Core
return;
}
var paths = p.GetFiles("*.png");
if (paths.Length == 0)
{
return;
}
else if (paths.Length == 1)
{
Picture.LoadGraph(graph, paths[0], info);
return;
}
bool isLoop = info[(gbol)"loop"];
PNGAnimation pa = new PNGAnimation(graph, path.FullName, paths, new GraphInfo(path, info), isLoop);

View File

@ -45,6 +45,8 @@ namespace VPet_Simulator.Core
PNGAnimation.LoadGraph(graph, path, info);
return;
}
if (path.Extension != ".png")
return;
int length = info.GetInt("length");
if (length == 0)
{