Paths.getFrames()

This commit is contained in:
Yoshman29
2022-11-19 15:05:52 +01:00
parent 0e434e8d61
commit 1fa0772c9e
4 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
1307
1309
+1 -1
View File
@@ -124,7 +124,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
if (xml.has.antialiasing) antialiasing = (xml.att.antialiasing == "true");
if (xml.has.sprite) sprite = xml.att.sprite;
frames = CoolUtil.loadFrames(Paths.image('characters/$sprite', null, true));
frames = Paths.getFrames('characters/$sprite', null);
for(anim in xml.nodes.anim) {
XMLUtil.addXMLAnimation(this, anim);
}
+2 -1
View File
@@ -1087,6 +1087,7 @@ class PlayState extends MusicBeatState
// notes.add(unspawnNotes.shift());
if (generatedMusic)
{
notes.forEachAlive(function(daNote:Note)
@@ -1137,7 +1138,7 @@ class PlayState extends MusicBeatState
});
}
if (!inCutscene)
keyShit();
+4
View File
@@ -168,6 +168,10 @@ class Paths
{
return FlxAtlasFrames.fromSparrow(image(key, library), file('images/$key.xml', library));
}
inline static public function getFrames(key:String, ?library:String) {
return CoolUtil.loadFrames(Paths.image(key, library, true));
}
inline static public function getSparrowAtlasAlt(key:String)
{
return FlxAtlasFrames.fromSparrow('$key.png', '$key.xml');