move files
improve Sprite read
This commit is contained in:
Perfare
2018-11-24 23:02:05 +08:00
parent 58d5a3fc37
commit 0a5b866a03
24 changed files with 316 additions and 151 deletions

29
AssetStudio/Progress.cs Normal file
View File

@@ -0,0 +1,29 @@
namespace AssetStudio
{
public static class Progress
{
public static IProgress Default = new DummyProgress();
private static int preValue;
public static void Reset()
{
preValue = 0;
Default.Report(0);
}
public static void Report(int current, int total)
{
var value = (int)(current * 100f / total);
Report(value);
}
private static void Report(int value)
{
if (value > preValue)
{
preValue = value;
Default.Report(value);
}
}
}
}