add Paths asset name helper

This commit is contained in:
George FunBook
2021-02-08 15:34:48 -06:00
parent a4b79abc5a
commit d16091dc24
21 changed files with 199 additions and 142 deletions

View File

@ -52,7 +52,7 @@ class Note extends FlxSprite
switch (daStage)
{
case 'school':
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
animation.add('greenScroll', [6]);
animation.add('redScroll', [7]);
@ -61,7 +61,7 @@ class Note extends FlxSprite
if (isSustainNote)
{
loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', true, 7, 6);
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
@ -78,7 +78,7 @@ class Note extends FlxSprite
updateHitbox();
case 'schoolEvil': // COPY PASTED CUZ I AM LAZY
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
animation.add('greenScroll', [6]);
animation.add('redScroll', [7]);
@ -87,7 +87,7 @@ class Note extends FlxSprite
if (isSustainNote)
{
loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', true, 7, 6);
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
@ -104,7 +104,7 @@ class Note extends FlxSprite
updateHitbox();
default:
frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml');
frames = Paths.getSparrowAtlas('NOTE_assets');
animation.addByPrefix('greenScroll', 'green0');
animation.addByPrefix('redScroll', 'red0');