mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2026-11-30 00:08:31 +08:00
Aseprite loading fix. Draw.Sprite overload
This commit is contained in:
1 parent
67f0bf6e88
commit
8917d7f873
3 files changed
+22
-6
No files matched your search
+9
-6
@@ -243,15 +243,18 @@ namespace Strawberry
|
||||
LoadSpritesDir(path);
|
||||
}
|
||||
|
||||
for (let file in Directory.EnumerateFiles(directory, "*.ase"))
|
||||
for (let file in Directory.EnumerateFiles(directory, "*.ase*"))
|
||||
{
|
||||
let path = scope String();
|
||||
file.GetFilePath(path);
|
||||
let sprite = new [Friend]Sprite(path);
|
||||
|
||||
path.Remove(0, ContentRoot.Length + 9);
|
||||
path.RemoveFromEnd(4);
|
||||
Sprites.Add(new String(path), sprite);
|
||||
if (path.EndsWith(".ase") || path.EndsWith(".aseprite"))
|
||||
{
|
||||
let sprite = new [Friend]Sprite(path);
|
||||
|
||||
path.Remove(0, ContentRoot.Length + 9);
|
||||
path.RemoveFromEnd(path.Length - path.IndexOf('.'));
|
||||
Sprites.Add(new String(path), sprite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user