Merge branch 'deferred_loading' of https://github.com/Geokureli/Funkin into Geokureli-deferred_loading
This commit is contained in:
@ -124,6 +124,10 @@ class PlayState extends MusicBeatState
|
||||
|
||||
override public function create()
|
||||
{
|
||||
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
// var gameCam:FlxCamera = FlxG.camera;
|
||||
camGame = new FlxCamera();
|
||||
camHUD = new FlxCamera();
|
||||
@ -163,11 +167,11 @@ class PlayState extends MusicBeatState
|
||||
"Only then I will even CONSIDER letting you\ndate my daughter!"
|
||||
];
|
||||
case 'senpai':
|
||||
dialogue = CoolUtil.coolTextFile('assets/data/senpai/senpaiDialogue.txt');
|
||||
dialogue = CoolUtil.coolTextFile(Paths.txt('senpai/senpaiDialogue'));
|
||||
case 'roses':
|
||||
dialogue = CoolUtil.coolTextFile('assets/data/roses/rosesDialogue.txt');
|
||||
dialogue = CoolUtil.coolTextFile(Paths.txt('roses/rosesDialogue'));
|
||||
case 'thorns':
|
||||
dialogue = CoolUtil.coolTextFile('assets/data/thorns/thornsDialogue.txt');
|
||||
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
||||
}
|
||||
|
||||
if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south')
|
||||
@ -175,7 +179,7 @@ class PlayState extends MusicBeatState
|
||||
curStage = "spooky";
|
||||
halloweenLevel = true;
|
||||
|
||||
var hallowTex = FlxAtlasFrames.fromSparrow('assets/images/halloween_bg.png', 'assets/images/halloween_bg.xml');
|
||||
var hallowTex = Paths.getSparrowAtlas('halloween_bg');
|
||||
|
||||
halloweenBG = new FlxSprite(-200, -100);
|
||||
halloweenBG.frames = hallowTex;
|
||||
@ -191,11 +195,11 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
curStage = 'philly';
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/philly/sky.png');
|
||||
var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('philly/sky'));
|
||||
bg.scrollFactor.set(0.1, 0.1);
|
||||
add(bg);
|
||||
|
||||
var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/philly/city.png');
|
||||
var city:FlxSprite = new FlxSprite(-10).loadGraphic(Paths.image('philly/city'));
|
||||
city.scrollFactor.set(0.3, 0.3);
|
||||
city.setGraphicSize(Std.int(city.width * 0.85));
|
||||
city.updateHitbox();
|
||||
@ -206,7 +210,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
for (i in 0...5)
|
||||
{
|
||||
var light:FlxSprite = new FlxSprite(city.x).loadGraphic('assets/images/philly/win' + i + '.png');
|
||||
var light:FlxSprite = new FlxSprite(city.x).loadGraphic(Paths.image('philly/win' + i));
|
||||
light.scrollFactor.set(0.3, 0.3);
|
||||
light.visible = false;
|
||||
light.setGraphicSize(Std.int(light.width * 0.85));
|
||||
@ -215,18 +219,18 @@ class PlayState extends MusicBeatState
|
||||
phillyCityLights.add(light);
|
||||
}
|
||||
|
||||
var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/philly/behindTrain.png');
|
||||
var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain'));
|
||||
add(streetBehind);
|
||||
|
||||
phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/philly/train.png');
|
||||
phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train'));
|
||||
add(phillyTrain);
|
||||
|
||||
trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt);
|
||||
trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes'));
|
||||
FlxG.sound.list.add(trainSound);
|
||||
|
||||
// var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png);
|
||||
|
||||
var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/philly/street.png');
|
||||
var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street'));
|
||||
add(street);
|
||||
}
|
||||
else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high')
|
||||
@ -234,12 +238,12 @@ class PlayState extends MusicBeatState
|
||||
curStage = 'limo';
|
||||
defaultCamZoom = 0.90;
|
||||
|
||||
var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic('assets/images/limo/limoSunset.png');
|
||||
var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset'));
|
||||
skyBG.scrollFactor.set(0.1, 0.1);
|
||||
add(skyBG);
|
||||
|
||||
var bgLimo:FlxSprite = new FlxSprite(-200, 480);
|
||||
bgLimo.frames = FlxAtlasFrames.fromSparrow('assets/images/limo/bgLimo.png', 'assets/images/limo/bgLimo.xml');
|
||||
bgLimo.frames = Paths.getSparrowAtlas('limo/bgLimo');
|
||||
bgLimo.animation.addByPrefix('drive', "background limo pink", 24);
|
||||
bgLimo.animation.play('drive');
|
||||
bgLimo.scrollFactor.set(0.4, 0.4);
|
||||
@ -255,7 +259,7 @@ class PlayState extends MusicBeatState
|
||||
grpLimoDancers.add(dancer);
|
||||
}
|
||||
|
||||
var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic('assets/images/limo/limoOverlay.png');
|
||||
var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('limo/limoOverlay'));
|
||||
overlayShit.alpha = 0.5;
|
||||
// add(overlayShit);
|
||||
|
||||
@ -265,7 +269,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
// overlayShit.shader = shaderBullshit;
|
||||
|
||||
var limoTex = FlxAtlasFrames.fromSparrow('assets/images/limo/limoDrive.png', 'assets/images/limo/limoDrive.xml');
|
||||
var limoTex = Paths.getSparrowAtlas('limo/limoDrive');
|
||||
|
||||
limo = new FlxSprite(-120, 550);
|
||||
limo.frames = limoTex;
|
||||
@ -273,7 +277,7 @@ class PlayState extends MusicBeatState
|
||||
limo.animation.play('drive');
|
||||
limo.antialiasing = true;
|
||||
|
||||
fastCar = new FlxSprite(-300, 160).loadGraphic('assets/images/limo/fastCarLol.png');
|
||||
fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol'));
|
||||
// add(limo);
|
||||
}
|
||||
else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog')
|
||||
@ -282,7 +286,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
defaultCamZoom = 0.80;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic('assets/images/christmas/bgWalls.png');
|
||||
var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('christmas/bgWalls'));
|
||||
bg.antialiasing = true;
|
||||
bg.scrollFactor.set(0.2, 0.2);
|
||||
bg.active = false;
|
||||
@ -291,7 +295,7 @@ class PlayState extends MusicBeatState
|
||||
add(bg);
|
||||
|
||||
upperBoppers = new FlxSprite(-240, -90);
|
||||
upperBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/upperBop.png', 'assets/images/christmas/upperBop.xml');
|
||||
upperBoppers.frames = Paths.getSparrowAtlas('christmas/upperBop');
|
||||
upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false);
|
||||
upperBoppers.antialiasing = true;
|
||||
upperBoppers.scrollFactor.set(0.33, 0.33);
|
||||
@ -299,7 +303,7 @@ class PlayState extends MusicBeatState
|
||||
upperBoppers.updateHitbox();
|
||||
add(upperBoppers);
|
||||
|
||||
var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic('assets/images/christmas/bgEscalator.png');
|
||||
var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('christmas/bgEscalator'));
|
||||
bgEscalator.antialiasing = true;
|
||||
bgEscalator.scrollFactor.set(0.3, 0.3);
|
||||
bgEscalator.active = false;
|
||||
@ -307,13 +311,13 @@ class PlayState extends MusicBeatState
|
||||
bgEscalator.updateHitbox();
|
||||
add(bgEscalator);
|
||||
|
||||
var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic('assets/images/christmas/christmasTree.png');
|
||||
var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree'));
|
||||
tree.antialiasing = true;
|
||||
tree.scrollFactor.set(0.40, 0.40);
|
||||
add(tree);
|
||||
|
||||
bottomBoppers = new FlxSprite(-300, 140);
|
||||
bottomBoppers.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/bottomBop.png', 'assets/images/christmas/bottomBop.xml');
|
||||
bottomBoppers.frames = Paths.getSparrowAtlas('christmas/bottomBop');
|
||||
bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false);
|
||||
bottomBoppers.antialiasing = true;
|
||||
bottomBoppers.scrollFactor.set(0.9, 0.9);
|
||||
@ -321,13 +325,13 @@ class PlayState extends MusicBeatState
|
||||
bottomBoppers.updateHitbox();
|
||||
add(bottomBoppers);
|
||||
|
||||
var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic('assets/images/christmas/fgSnow.png');
|
||||
var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow'));
|
||||
fgSnow.active = false;
|
||||
fgSnow.antialiasing = true;
|
||||
add(fgSnow);
|
||||
|
||||
santa = new FlxSprite(-840, 150);
|
||||
santa.frames = FlxAtlasFrames.fromSparrow('assets/images/christmas/santa.png', 'assets/images/christmas/santa.xml');
|
||||
santa.frames = Paths.getSparrowAtlas('christmas/santa');
|
||||
santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false);
|
||||
santa.antialiasing = true;
|
||||
add(santa);
|
||||
@ -335,7 +339,7 @@ class PlayState extends MusicBeatState
|
||||
else if (SONG.song.toLowerCase() == 'winter-horrorland')
|
||||
{
|
||||
curStage = 'mallEvil';
|
||||
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic('assets/images/christmas/evilBG.png');
|
||||
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG'));
|
||||
bg.antialiasing = true;
|
||||
bg.scrollFactor.set(0.2, 0.2);
|
||||
bg.active = false;
|
||||
@ -343,12 +347,12 @@ class PlayState extends MusicBeatState
|
||||
bg.updateHitbox();
|
||||
add(bg);
|
||||
|
||||
var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic('assets/images/christmas/evilTree.png');
|
||||
var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('christmas/evilTree'));
|
||||
evilTree.antialiasing = true;
|
||||
evilTree.scrollFactor.set(0.2, 0.2);
|
||||
add(evilTree);
|
||||
|
||||
var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic("assets/images/christmas/evilSnow.png");
|
||||
var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow"));
|
||||
evilSnow.antialiasing = true;
|
||||
add(evilSnow);
|
||||
}
|
||||
@ -358,26 +362,26 @@ class PlayState extends MusicBeatState
|
||||
|
||||
// defaultCamZoom = 0.9;
|
||||
|
||||
var bgSky = new FlxSprite().loadGraphic('assets/images/weeb/weebSky.png');
|
||||
var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky'));
|
||||
bgSky.scrollFactor.set(0.1, 0.1);
|
||||
add(bgSky);
|
||||
|
||||
var repositionShit = -200;
|
||||
|
||||
var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic('assets/images/weeb/weebSchool.png');
|
||||
var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('weeb/weebSchool'));
|
||||
bgSchool.scrollFactor.set(0.6, 0.90);
|
||||
add(bgSchool);
|
||||
|
||||
var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic('assets/images/weeb/weebStreet.png');
|
||||
var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic(Paths.image('weeb/weebStreet'));
|
||||
bgStreet.scrollFactor.set(0.95, 0.95);
|
||||
add(bgStreet);
|
||||
|
||||
var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic('assets/images/weeb/weebTreesBack.png');
|
||||
var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic(Paths.image('weeb/weebTreesBack'));
|
||||
fgTrees.scrollFactor.set(0.9, 0.9);
|
||||
add(fgTrees);
|
||||
|
||||
var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800);
|
||||
var treetex = FlxAtlasFrames.fromSpriteSheetPacker('assets/images/weeb/weebTrees.png', 'assets/images/weeb/weebTrees.txt');
|
||||
var treetex = Paths.getPackerAtlas('weeb/weebTrees');
|
||||
bgTrees.frames = treetex;
|
||||
bgTrees.animation.add('treeLoop', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], 12);
|
||||
bgTrees.animation.play('treeLoop');
|
||||
@ -385,7 +389,7 @@ class PlayState extends MusicBeatState
|
||||
add(bgTrees);
|
||||
|
||||
var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40);
|
||||
treeLeaves.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/petals.png', 'assets/images/weeb/petals.xml');
|
||||
treeLeaves.frames = Paths.getSparrowAtlas('weeb/petals');
|
||||
treeLeaves.animation.addByPrefix('leaves', 'PETALS ALL', 24, true);
|
||||
treeLeaves.animation.play('leaves');
|
||||
treeLeaves.scrollFactor.set(0.85, 0.85);
|
||||
@ -430,7 +434,7 @@ class PlayState extends MusicBeatState
|
||||
var posY = 200;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(posX, posY);
|
||||
bg.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/animatedEvilSchool.png', 'assets/images/weeb/animatedEvilSchool.xml');
|
||||
bg.frames = Paths.getSparrowAtlas('weeb/animatedEvilSchool');
|
||||
bg.animation.addByPrefix('idle', 'background 2', 24);
|
||||
bg.animation.play('idle');
|
||||
bg.scrollFactor.set(0.8, 0.9);
|
||||
@ -438,13 +442,13 @@ class PlayState extends MusicBeatState
|
||||
add(bg);
|
||||
|
||||
/*
|
||||
var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolBG.png');
|
||||
var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolBG'));
|
||||
bg.scale.set(6, 6);
|
||||
// bg.setGraphicSize(Std.int(bg.width * 6));
|
||||
// bg.updateHitbox();
|
||||
add(bg);
|
||||
|
||||
var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic('assets/images/weeb/evilSchoolFG.png');
|
||||
var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolFG'));
|
||||
fg.scale.set(6, 6);
|
||||
// fg.setGraphicSize(Std.int(fg.width * 6));
|
||||
// fg.updateHitbox();
|
||||
@ -485,13 +489,13 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
defaultCamZoom = 0.9;
|
||||
curStage = 'stage';
|
||||
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png');
|
||||
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
|
||||
bg.antialiasing = true;
|
||||
bg.scrollFactor.set(0.9, 0.9);
|
||||
bg.active = false;
|
||||
add(bg);
|
||||
|
||||
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic('assets/images/stagefront.png');
|
||||
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));
|
||||
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
|
||||
stageFront.updateHitbox();
|
||||
stageFront.antialiasing = true;
|
||||
@ -499,7 +503,7 @@ class PlayState extends MusicBeatState
|
||||
stageFront.active = false;
|
||||
add(stageFront);
|
||||
|
||||
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic('assets/images/stagecurtains.png');
|
||||
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains'));
|
||||
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
|
||||
stageCurtains.updateHitbox();
|
||||
stageCurtains.antialiasing = true;
|
||||
@ -661,7 +665,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
FlxG.fixedTimestep = false;
|
||||
|
||||
healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic('assets/images/healthBar.png');
|
||||
healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(Paths.image('healthBar'));
|
||||
healthBarBG.screenCenter(X);
|
||||
healthBarBG.scrollFactor.set();
|
||||
add(healthBarBG);
|
||||
@ -674,7 +678,7 @@ class PlayState extends MusicBeatState
|
||||
add(healthBar);
|
||||
|
||||
scoreTxt = new FlxText(healthBarBG.x + healthBarBG.width - 190, healthBarBG.y + 30, 0, "", 20);
|
||||
scoreTxt.setFormat("assets/fonts/vcr.ttf", 16, FlxColor.WHITE, RIGHT);
|
||||
scoreTxt.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT);
|
||||
scoreTxt.scrollFactor.set();
|
||||
add(scoreTxt);
|
||||
|
||||
@ -715,7 +719,7 @@ class PlayState extends MusicBeatState
|
||||
new FlxTimer().start(0.1, function(tmr:FlxTimer)
|
||||
{
|
||||
remove(blackScreen);
|
||||
FlxG.sound.play('assets/sounds/Lights_Turn_On' + TitleState.soundExt);
|
||||
FlxG.sound.play(Paths.sound('Lights_Turn_On'));
|
||||
camFollow.y = -2050;
|
||||
camFollow.x += 200;
|
||||
FlxG.camera.focusOn(camFollow.getPosition());
|
||||
@ -737,7 +741,7 @@ class PlayState extends MusicBeatState
|
||||
case 'senpai':
|
||||
schoolIntro(doof);
|
||||
case 'roses':
|
||||
FlxG.sound.play('assets/sounds/ANGRY' + TitleState.soundExt);
|
||||
FlxG.sound.play(Paths.sound('ANGRY'));
|
||||
schoolIntro(doof);
|
||||
case 'thorns':
|
||||
schoolIntro(doof);
|
||||
@ -767,7 +771,7 @@ class PlayState extends MusicBeatState
|
||||
red.scrollFactor.set();
|
||||
|
||||
var senpaiEvil:FlxSprite = new FlxSprite();
|
||||
senpaiEvil.frames = FlxAtlasFrames.fromSparrow('assets/images/weeb/senpaiCrazy.png', 'assets/images/weeb/senpaiCrazy.xml');
|
||||
senpaiEvil.frames = Paths.getSparrowAtlas('weeb/senpaiCrazy');
|
||||
senpaiEvil.animation.addByPrefix('idle', 'Senpai Pre Explosion', 24, false);
|
||||
senpaiEvil.setGraphicSize(Std.int(senpaiEvil.width * 6));
|
||||
senpaiEvil.scrollFactor.set();
|
||||
@ -812,7 +816,7 @@ class PlayState extends MusicBeatState
|
||||
else
|
||||
{
|
||||
senpaiEvil.animation.play('idle');
|
||||
FlxG.sound.play('assets/sounds/Senpai_Dies' + TitleState.soundExt, 1, false, null, true, function()
|
||||
FlxG.sound.play(Paths.sound('Senpai_Dies'), 1, false, null, true, function()
|
||||
{
|
||||
remove(senpaiEvil);
|
||||
remove(red);
|
||||
@ -865,16 +869,16 @@ class PlayState extends MusicBeatState
|
||||
boyfriend.playAnim('idle');
|
||||
|
||||
var introAssets:Map<String, Array<String>> = new Map<String, Array<String>>();
|
||||
introAssets.set('default', ['ready.png', "set.png", "go.png"]);
|
||||
introAssets.set('default', ['ready', "set", "go"]);
|
||||
introAssets.set('school', [
|
||||
'weeb/pixelUI/ready-pixel.png',
|
||||
'weeb/pixelUI/set-pixel.png',
|
||||
'weeb/pixelUI/date-pixel.png'
|
||||
'weeb/pixelUI/ready-pixel',
|
||||
'weeb/pixelUI/set-pixel',
|
||||
'weeb/pixelUI/date-pixel'
|
||||
]);
|
||||
introAssets.set('schoolEvil', [
|
||||
'weeb/pixelUI/ready-pixel.png',
|
||||
'weeb/pixelUI/set-pixel.png',
|
||||
'weeb/pixelUI/date-pixel.png'
|
||||
'weeb/pixelUI/ready-pixel',
|
||||
'weeb/pixelUI/set-pixel',
|
||||
'weeb/pixelUI/date-pixel'
|
||||
]);
|
||||
|
||||
var introAlts:Array<String> = introAssets.get('default');
|
||||
@ -893,9 +897,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
{
|
||||
case 0:
|
||||
FlxG.sound.play('assets/sounds/intro3' + altSuffix + TitleState.soundExt, 0.6);
|
||||
FlxG.sound.play(Paths.sound('intro3'), 0.6);
|
||||
case 1:
|
||||
var ready:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[0]);
|
||||
var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0]));
|
||||
ready.scrollFactor.set();
|
||||
ready.updateHitbox();
|
||||
|
||||
@ -911,9 +915,9 @@ class PlayState extends MusicBeatState
|
||||
ready.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play('assets/sounds/intro2' + altSuffix + TitleState.soundExt, 0.6);
|
||||
FlxG.sound.play(Paths.sound('intro2'), 0.6);
|
||||
case 2:
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[1]);
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[1]));
|
||||
set.scrollFactor.set();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
@ -928,9 +932,9 @@ class PlayState extends MusicBeatState
|
||||
set.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play('assets/sounds/intro1' + altSuffix + TitleState.soundExt, 0.6);
|
||||
FlxG.sound.play(Paths.sound('intro1'), 0.6);
|
||||
case 3:
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + introAlts[2]);
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[2]));
|
||||
go.scrollFactor.set();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
@ -947,7 +951,7 @@ class PlayState extends MusicBeatState
|
||||
go.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play('assets/sounds/introGo' + altSuffix + TitleState.soundExt, 0.6);
|
||||
FlxG.sound.play(Paths.sound('introGo'), 0.6);
|
||||
case 4:
|
||||
}
|
||||
|
||||
@ -968,7 +972,7 @@ class PlayState extends MusicBeatState
|
||||
lastReportedPlayheadPosition = 0;
|
||||
|
||||
if (!paused)
|
||||
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
|
||||
FlxG.sound.playMusic(Paths.inst(PlayState.SONG.song), 1, false);
|
||||
FlxG.sound.music.onComplete = endSong;
|
||||
vocals.play();
|
||||
}
|
||||
@ -985,7 +989,7 @@ class PlayState extends MusicBeatState
|
||||
curSong = songData.song;
|
||||
|
||||
if (SONG.needsVoices)
|
||||
vocals = new FlxSound().loadEmbedded("assets/music/" + curSong + "_Voices" + TitleState.soundExt);
|
||||
vocals = new FlxSound().loadEmbedded(Paths.voices(PlayState.SONG.song));
|
||||
else
|
||||
vocals = new FlxSound();
|
||||
|
||||
@ -1085,7 +1089,7 @@ class PlayState extends MusicBeatState
|
||||
switch (curStage)
|
||||
{
|
||||
case 'school' | 'schoolEvil':
|
||||
babyArrow.loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
|
||||
babyArrow.loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
|
||||
babyArrow.animation.add('green', [6]);
|
||||
babyArrow.animation.add('red', [7]);
|
||||
babyArrow.animation.add('blue', [5]);
|
||||
@ -1120,7 +1124,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
default:
|
||||
babyArrow.frames = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml');
|
||||
babyArrow.frames = Paths.getSparrowAtlas('NOTE_assets');
|
||||
babyArrow.animation.addByPrefix('green', 'arrowUP');
|
||||
babyArrow.animation.addByPrefix('blue', 'arrowDOWN');
|
||||
babyArrow.animation.addByPrefix('purple', 'arrowLEFT');
|
||||
@ -1608,7 +1612,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (storyPlaylist.length <= 0)
|
||||
{
|
||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt);
|
||||
FlxG.sound.playMusic(Paths.music('freakyMenu'));
|
||||
|
||||
transIn = FlxTransitionableState.defaultTransIn;
|
||||
transOut = FlxTransitionableState.defaultTransOut;
|
||||
@ -1648,7 +1652,7 @@ class PlayState extends MusicBeatState
|
||||
add(blackShit);
|
||||
camHUD.visible = false;
|
||||
|
||||
FlxG.sound.play('assets/sounds/Lights_Shut_off' + TitleState.soundExt);
|
||||
FlxG.sound.play(Paths.sound('Lights_Shut_off'));
|
||||
}
|
||||
|
||||
FlxTransitionableState.skipNextTransIn = true;
|
||||
@ -1658,7 +1662,7 @@ class PlayState extends MusicBeatState
|
||||
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]);
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
FlxG.switchState(new PlayState());
|
||||
LoadingState.loadAndSwitchState(new PlayState());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1723,7 +1727,7 @@ class PlayState extends MusicBeatState
|
||||
pixelShitPart2 = '-pixel';
|
||||
}
|
||||
|
||||
rating.loadGraphic('assets/images/' + pixelShitPart1 + daRating + pixelShitPart2 + ".png");
|
||||
rating.loadGraphic(Paths.image(pixelShitPart1 + daRating + pixelShitPart2));
|
||||
rating.screenCenter();
|
||||
rating.x = coolText.x - 40;
|
||||
rating.y -= 60;
|
||||
@ -1731,7 +1735,7 @@ class PlayState extends MusicBeatState
|
||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||
|
||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + pixelShitPart1 + 'combo' + pixelShitPart2 + '.png');
|
||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||
comboSpr.screenCenter();
|
||||
comboSpr.x = coolText.x;
|
||||
comboSpr.acceleration.y = 600;
|
||||
@ -1765,7 +1769,7 @@ class PlayState extends MusicBeatState
|
||||
var daLoop:Int = 0;
|
||||
for (i in seperatedScore)
|
||||
{
|
||||
var numScore:FlxSprite = new FlxSprite().loadGraphic('assets/images/' + pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2 + '.png');
|
||||
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2));
|
||||
numScore.screenCenter();
|
||||
numScore.x = coolText.x + (43 * daLoop) - 90;
|
||||
numScore.y += 80;
|
||||
@ -2023,7 +2027,7 @@ class PlayState extends MusicBeatState
|
||||
if (!boyfriend.stunned)
|
||||
{
|
||||
health -= 0.04;
|
||||
if (combo > 5)
|
||||
if (combo > 5 && gf.animOffsets.exists('sad'))
|
||||
{
|
||||
gf.playAnim('sad');
|
||||
}
|
||||
@ -2031,8 +2035,8 @@ class PlayState extends MusicBeatState
|
||||
|
||||
songScore -= 10;
|
||||
|
||||
FlxG.sound.play('assets/sounds/missnote' + FlxG.random.int(1, 3) + TitleState.soundExt, FlxG.random.float(0.1, 0.2));
|
||||
// FlxG.sound.play('assets/sounds/missnote1' + TitleState.soundExt, 1, false);
|
||||
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
||||
// FlxG.sound.play(Paths.sound('missnote1'), 1, false);
|
||||
// FlxG.log.add('played imss note');
|
||||
|
||||
boyfriend.stunned = true;
|
||||
@ -2145,7 +2149,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
function fastCarDrive()
|
||||
{
|
||||
FlxG.sound.play('assets/sounds/carPass' + FlxG.random.int(0, 1) + TitleState.soundExt, 0.7);
|
||||
FlxG.sound.play(Paths.soundRandom('carPass', 0, 1), 0.7);
|
||||
|
||||
fastCar.velocity.x = (FlxG.random.int(170, 220) / FlxG.elapsed) * 3;
|
||||
fastCarCanDrive = false;
|
||||
@ -2211,7 +2215,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
function lightningStrikeShit():Void
|
||||
{
|
||||
FlxG.sound.play('assets/sounds/thunder_' + FlxG.random.int(1, 2) + TitleState.soundExt);
|
||||
FlxG.sound.play(Paths.soundRandom('thunder_', 1, 2));
|
||||
halloweenBG.animation.play('lightning');
|
||||
|
||||
lightningStrikeBeat = curBeat;
|
||||
|
Reference in New Issue
Block a user