1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-25 16:24:40 +00:00

Merge pull request #640 from VoltrexMaster/patch-1

feat(performance): Use switch statement
This commit is contained in:
Cameron Taylor 2021-03-29 13:45:54 -07:00 committed by GitHub
commit 5425ae08cb

View file

@ -227,344 +227,347 @@ class PlayState extends MusicBeatState
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC); DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
#end #end
if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') switch (SONG.song.toLowerCase())
{ {
curStage = "spooky"; case 'spookeez' | 'monster' | 'south':
halloweenLevel = true; {
curStage = 'spooky';
halloweenLevel = true;
var hallowTex = Paths.getSparrowAtlas('halloween_bg'); var hallowTex = Paths.getSparrowAtlas('halloween_bg');
halloweenBG = new FlxSprite(-200, -100); halloweenBG = new FlxSprite(-200, -100);
halloweenBG.frames = hallowTex; halloweenBG.frames = hallowTex;
halloweenBG.animation.addByPrefix('idle', 'halloweem bg0'); halloweenBG.animation.addByPrefix('idle', 'halloweem bg0');
halloweenBG.animation.addByPrefix('lightning', 'halloweem bg lightning strike', 24, false); halloweenBG.animation.addByPrefix('lightning', 'halloweem bg lightning strike', 24, false);
halloweenBG.animation.play('idle'); halloweenBG.animation.play('idle');
halloweenBG.antialiasing = true; halloweenBG.antialiasing = true;
add(halloweenBG); add(halloweenBG);
isHalloween = true; isHalloween = true;
} }
else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed' || SONG.song.toLowerCase() == 'philly') case 'pico' | 'blammed' | 'philly':
{ {
curStage = 'philly'; curStage = 'philly';
var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('philly/sky')); var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('philly/sky'));
bg.scrollFactor.set(0.1, 0.1); bg.scrollFactor.set(0.1, 0.1);
add(bg); add(bg);
var city:FlxSprite = new FlxSprite(-10).loadGraphic(Paths.image('philly/city')); var city:FlxSprite = new FlxSprite(-10).loadGraphic(Paths.image('philly/city'));
city.scrollFactor.set(0.3, 0.3); city.scrollFactor.set(0.3, 0.3);
city.setGraphicSize(Std.int(city.width * 0.85)); city.setGraphicSize(Std.int(city.width * 0.85));
city.updateHitbox(); city.updateHitbox();
add(city); add(city);
phillyCityLights = new FlxTypedGroup<FlxSprite>(); phillyCityLights = new FlxTypedGroup<FlxSprite>();
add(phillyCityLights); add(phillyCityLights);
for (i in 0...5) for (i in 0...5)
{ {
var light:FlxSprite = new FlxSprite(city.x).loadGraphic(Paths.image('philly/win' + i)); var light:FlxSprite = new FlxSprite(city.x).loadGraphic(Paths.image('philly/win' + i));
light.scrollFactor.set(0.3, 0.3); light.scrollFactor.set(0.3, 0.3);
light.visible = false; light.visible = false;
light.setGraphicSize(Std.int(light.width * 0.85)); light.setGraphicSize(Std.int(light.width * 0.85));
light.updateHitbox(); light.updateHitbox();
light.antialiasing = true; light.antialiasing = true;
phillyCityLights.add(light); phillyCityLights.add(light);
} }
var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain')); var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain'));
add(streetBehind); add(streetBehind);
phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train')); phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train'));
add(phillyTrain); add(phillyTrain);
trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes')); trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes'));
FlxG.sound.list.add(trainSound); FlxG.sound.list.add(trainSound);
// var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png);
var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street')); var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street'));
add(street); add(street);
} }
else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') case 'milf' | 'satin-panties' | 'high':
{ {
curStage = 'limo'; curStage = 'limo';
defaultCamZoom = 0.90; defaultCamZoom = 0.90;
var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset')); var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset'));
skyBG.scrollFactor.set(0.1, 0.1); skyBG.scrollFactor.set(0.1, 0.1);
add(skyBG); add(skyBG);
var bgLimo:FlxSprite = new FlxSprite(-200, 480); var bgLimo:FlxSprite = new FlxSprite(-200, 480);
bgLimo.frames = Paths.getSparrowAtlas('limo/bgLimo'); bgLimo.frames = Paths.getSparrowAtlas('limo/bgLimo');
bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.addByPrefix('drive', "background limo pink", 24);
bgLimo.animation.play('drive'); bgLimo.animation.play('drive');
bgLimo.scrollFactor.set(0.4, 0.4); bgLimo.scrollFactor.set(0.4, 0.4);
add(bgLimo); add(bgLimo);
grpLimoDancers = new FlxTypedGroup<BackgroundDancer>(); grpLimoDancers = new FlxTypedGroup<BackgroundDancer>();
add(grpLimoDancers); add(grpLimoDancers);
for (i in 0...5) for (i in 0...5)
{ {
var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, bgLimo.y - 400); var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, bgLimo.y - 400);
dancer.scrollFactor.set(0.4, 0.4); dancer.scrollFactor.set(0.4, 0.4);
grpLimoDancers.add(dancer); grpLimoDancers.add(dancer);
} }
var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('limo/limoOverlay')); var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('limo/limoOverlay'));
overlayShit.alpha = 0.5; overlayShit.alpha = 0.5;
// add(overlayShit); // add(overlayShit);
// var shaderBullshit = new BlendModeEffect(new OverlayShader(), FlxColor.RED); // var shaderBullshit = new BlendModeEffect(new OverlayShader(), FlxColor.RED);
// FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]); // FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]);
// overlayShit.shader = shaderBullshit; // overlayShit.shader = shaderBullshit;
var limoTex = Paths.getSparrowAtlas('limo/limoDrive'); var limoTex = Paths.getSparrowAtlas('limo/limoDrive');
limo = new FlxSprite(-120, 550); limo = new FlxSprite(-120, 550);
limo.frames = limoTex; limo.frames = limoTex;
limo.animation.addByPrefix('drive', "Limo stage", 24); limo.animation.addByPrefix('drive', "Limo stage", 24);
limo.animation.play('drive'); limo.animation.play('drive');
limo.antialiasing = true; limo.antialiasing = true;
fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol')); fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol'));
// add(limo); // add(limo);
} }
else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog') case 'cocoa' | 'eggnog':
{ {
curStage = 'mall'; curStage = 'mall';
defaultCamZoom = 0.80; defaultCamZoom = 0.80;
var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('christmas/bgWalls')); var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('christmas/bgWalls'));
bg.antialiasing = true; bg.antialiasing = true;
bg.scrollFactor.set(0.2, 0.2); bg.scrollFactor.set(0.2, 0.2);
bg.active = false; bg.active = false;
bg.setGraphicSize(Std.int(bg.width * 0.8)); bg.setGraphicSize(Std.int(bg.width * 0.8));
bg.updateHitbox(); bg.updateHitbox();
add(bg); add(bg);
upperBoppers = new FlxSprite(-240, -90); upperBoppers = new FlxSprite(-240, -90);
upperBoppers.frames = Paths.getSparrowAtlas('christmas/upperBop'); upperBoppers.frames = Paths.getSparrowAtlas('christmas/upperBop');
upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false); upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false);
upperBoppers.antialiasing = true; upperBoppers.antialiasing = true;
upperBoppers.scrollFactor.set(0.33, 0.33); upperBoppers.scrollFactor.set(0.33, 0.33);
upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85));
upperBoppers.updateHitbox(); upperBoppers.updateHitbox();
add(upperBoppers); add(upperBoppers);
var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('christmas/bgEscalator')); var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('christmas/bgEscalator'));
bgEscalator.antialiasing = true; bgEscalator.antialiasing = true;
bgEscalator.scrollFactor.set(0.3, 0.3); bgEscalator.scrollFactor.set(0.3, 0.3);
bgEscalator.active = false; bgEscalator.active = false;
bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9));
bgEscalator.updateHitbox(); bgEscalator.updateHitbox();
add(bgEscalator); add(bgEscalator);
var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree')); var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree'));
tree.antialiasing = true; tree.antialiasing = true;
tree.scrollFactor.set(0.40, 0.40); tree.scrollFactor.set(0.40, 0.40);
add(tree); add(tree);
bottomBoppers = new FlxSprite(-300, 140); bottomBoppers = new FlxSprite(-300, 140);
bottomBoppers.frames = Paths.getSparrowAtlas('christmas/bottomBop'); bottomBoppers.frames = Paths.getSparrowAtlas('christmas/bottomBop');
bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false); bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false);
bottomBoppers.antialiasing = true; bottomBoppers.antialiasing = true;
bottomBoppers.scrollFactor.set(0.9, 0.9); bottomBoppers.scrollFactor.set(0.9, 0.9);
bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1)); bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1));
bottomBoppers.updateHitbox(); bottomBoppers.updateHitbox();
add(bottomBoppers); add(bottomBoppers);
var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow')); var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow'));
fgSnow.active = false; fgSnow.active = false;
fgSnow.antialiasing = true; fgSnow.antialiasing = true;
add(fgSnow); add(fgSnow);
santa = new FlxSprite(-840, 150); santa = new FlxSprite(-840, 150);
santa.frames = Paths.getSparrowAtlas('christmas/santa'); santa.frames = Paths.getSparrowAtlas('christmas/santa');
santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false);
santa.antialiasing = true; santa.antialiasing = true;
add(santa); add(santa);
} }
else if (SONG.song.toLowerCase() == 'winter-horrorland') case 'winter-horrorland':
{ {
curStage = 'mallEvil'; curStage = 'mallEvil';
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG')); var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG'));
bg.antialiasing = true; bg.antialiasing = true;
bg.scrollFactor.set(0.2, 0.2); bg.scrollFactor.set(0.2, 0.2);
bg.active = false; bg.active = false;
bg.setGraphicSize(Std.int(bg.width * 0.8)); bg.setGraphicSize(Std.int(bg.width * 0.8));
bg.updateHitbox(); bg.updateHitbox();
add(bg); add(bg);
var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('christmas/evilTree')); var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('christmas/evilTree'));
evilTree.antialiasing = true; evilTree.antialiasing = true;
evilTree.scrollFactor.set(0.2, 0.2); evilTree.scrollFactor.set(0.2, 0.2);
add(evilTree); add(evilTree);
var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow")); var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow"));
evilSnow.antialiasing = true; evilSnow.antialiasing = true;
add(evilSnow); add(evilSnow);
} }
else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses') case 'senpai' | 'roses':
{ {
curStage = 'school'; curStage = 'school';
// defaultCamZoom = 0.9; // defaultCamZoom = 0.9;
var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky')); var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky'));
bgSky.scrollFactor.set(0.1, 0.1); bgSky.scrollFactor.set(0.1, 0.1);
add(bgSky); add(bgSky);
var repositionShit = -200; var repositionShit = -200;
var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('weeb/weebSchool')); var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('weeb/weebSchool'));
bgSchool.scrollFactor.set(0.6, 0.90); bgSchool.scrollFactor.set(0.6, 0.90);
add(bgSchool); add(bgSchool);
var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic(Paths.image('weeb/weebStreet')); var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic(Paths.image('weeb/weebStreet'));
bgStreet.scrollFactor.set(0.95, 0.95); bgStreet.scrollFactor.set(0.95, 0.95);
add(bgStreet); add(bgStreet);
var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic(Paths.image('weeb/weebTreesBack')); var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic(Paths.image('weeb/weebTreesBack'));
fgTrees.scrollFactor.set(0.9, 0.9); fgTrees.scrollFactor.set(0.9, 0.9);
add(fgTrees); add(fgTrees);
var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800); var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800);
var treetex = Paths.getPackerAtlas('weeb/weebTrees'); var treetex = Paths.getPackerAtlas('weeb/weebTrees');
bgTrees.frames = treetex; 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.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'); bgTrees.animation.play('treeLoop');
bgTrees.scrollFactor.set(0.85, 0.85); bgTrees.scrollFactor.set(0.85, 0.85);
add(bgTrees); add(bgTrees);
var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40);
treeLeaves.frames = Paths.getSparrowAtlas('weeb/petals'); treeLeaves.frames = Paths.getSparrowAtlas('weeb/petals');
treeLeaves.animation.addByPrefix('leaves', 'PETALS ALL', 24, true); treeLeaves.animation.addByPrefix('leaves', 'PETALS ALL', 24, true);
treeLeaves.animation.play('leaves'); treeLeaves.animation.play('leaves');
treeLeaves.scrollFactor.set(0.85, 0.85); treeLeaves.scrollFactor.set(0.85, 0.85);
add(treeLeaves); add(treeLeaves);
var widShit = Std.int(bgSky.width * 6); var widShit = Std.int(bgSky.width * 6);
bgSky.setGraphicSize(widShit); bgSky.setGraphicSize(widShit);
bgSchool.setGraphicSize(widShit); bgSchool.setGraphicSize(widShit);
bgStreet.setGraphicSize(widShit); bgStreet.setGraphicSize(widShit);
bgTrees.setGraphicSize(Std.int(widShit * 1.4)); bgTrees.setGraphicSize(Std.int(widShit * 1.4));
fgTrees.setGraphicSize(Std.int(widShit * 0.8)); fgTrees.setGraphicSize(Std.int(widShit * 0.8));
treeLeaves.setGraphicSize(widShit); treeLeaves.setGraphicSize(widShit);
fgTrees.updateHitbox(); fgTrees.updateHitbox();
bgSky.updateHitbox(); bgSky.updateHitbox();
bgSchool.updateHitbox(); bgSchool.updateHitbox();
bgStreet.updateHitbox(); bgStreet.updateHitbox();
bgTrees.updateHitbox(); bgTrees.updateHitbox();
treeLeaves.updateHitbox(); treeLeaves.updateHitbox();
bgGirls = new BackgroundGirls(-100, 190); bgGirls = new BackgroundGirls(-100, 190);
bgGirls.scrollFactor.set(0.9, 0.9); bgGirls.scrollFactor.set(0.9, 0.9);
if (SONG.song.toLowerCase() == 'roses') if (SONG.song.toLowerCase() == 'roses')
{ {
bgGirls.getScared(); bgGirls.getScared();
} }
bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom));
bgGirls.updateHitbox(); bgGirls.updateHitbox();
add(bgGirls); add(bgGirls);
} }
else if (SONG.song.toLowerCase() == 'thorns') case 'thorns':
{ {
curStage = 'schoolEvil'; curStage = 'schoolEvil';
var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2); var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2);
var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2); var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2);
var posX = 400; var posX = 400;
var posY = 200; var posY = 200;
var bg:FlxSprite = new FlxSprite(posX, posY); var bg:FlxSprite = new FlxSprite(posX, posY);
bg.frames = Paths.getSparrowAtlas('weeb/animatedEvilSchool'); bg.frames = Paths.getSparrowAtlas('weeb/animatedEvilSchool');
bg.animation.addByPrefix('idle', 'background 2', 24); bg.animation.addByPrefix('idle', 'background 2', 24);
bg.animation.play('idle'); bg.animation.play('idle');
bg.scrollFactor.set(0.8, 0.9); bg.scrollFactor.set(0.8, 0.9);
bg.scale.set(6, 6); bg.scale.set(6, 6);
add(bg); add(bg);
/* /*
var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolBG')); var bg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolBG'));
bg.scale.set(6, 6); bg.scale.set(6, 6);
// bg.setGraphicSize(Std.int(bg.width * 6)); // bg.setGraphicSize(Std.int(bg.width * 6));
// bg.updateHitbox(); // bg.updateHitbox();
add(bg); add(bg);
var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolFG')); var fg:FlxSprite = new FlxSprite(posX, posY).loadGraphic(Paths.image('weeb/evilSchoolFG'));
fg.scale.set(6, 6); fg.scale.set(6, 6);
// fg.setGraphicSize(Std.int(fg.width * 6)); // fg.setGraphicSize(Std.int(fg.width * 6));
// fg.updateHitbox(); // fg.updateHitbox();
add(fg); add(fg);
wiggleShit.effectType = WiggleEffectType.DREAMY; wiggleShit.effectType = WiggleEffectType.DREAMY;
wiggleShit.waveAmplitude = 0.01; wiggleShit.waveAmplitude = 0.01;
wiggleShit.waveFrequency = 60; wiggleShit.waveFrequency = 60;
wiggleShit.waveSpeed = 0.8; wiggleShit.waveSpeed = 0.8;
*/ */
// bg.shader = wiggleShit.shader; // bg.shader = wiggleShit.shader;
// fg.shader = wiggleShit.shader; // fg.shader = wiggleShit.shader;
/* /*
var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]);
var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]);
// Using scale since setGraphicSize() doesnt work??? // Using scale since setGraphicSize() doesnt work???
waveSprite.scale.set(6, 6); waveSprite.scale.set(6, 6);
waveSpriteFG.scale.set(6, 6); waveSpriteFG.scale.set(6, 6);
waveSprite.setPosition(posX, posY); waveSprite.setPosition(posX, posY);
waveSpriteFG.setPosition(posX, posY); waveSpriteFG.setPosition(posX, posY);
waveSprite.scrollFactor.set(0.7, 0.8); waveSprite.scrollFactor.set(0.7, 0.8);
waveSpriteFG.scrollFactor.set(0.9, 0.8); waveSpriteFG.scrollFactor.set(0.9, 0.8);
// waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6));
// waveSprite.updateHitbox(); // waveSprite.updateHitbox();
// waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6));
// waveSpriteFG.updateHitbox(); // waveSpriteFG.updateHitbox();
add(waveSprite); add(waveSprite);
add(waveSpriteFG); add(waveSpriteFG);
*/ */
} }
else default:
{ {
defaultCamZoom = 0.9; defaultCamZoom = 0.9;
curStage = 'stage'; curStage = 'stage';
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback')); var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
bg.antialiasing = true; bg.antialiasing = true;
bg.scrollFactor.set(0.9, 0.9); bg.scrollFactor.set(0.9, 0.9);
bg.active = false; bg.active = false;
add(bg); add(bg);
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront')); var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
stageFront.updateHitbox(); stageFront.updateHitbox();
stageFront.antialiasing = true; stageFront.antialiasing = true;
stageFront.scrollFactor.set(0.9, 0.9); stageFront.scrollFactor.set(0.9, 0.9);
stageFront.active = false; stageFront.active = false;
add(stageFront); add(stageFront);
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains')); var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains'));
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
stageCurtains.updateHitbox(); stageCurtains.updateHitbox();
stageCurtains.antialiasing = true; stageCurtains.antialiasing = true;
stageCurtains.scrollFactor.set(1.3, 1.3); stageCurtains.scrollFactor.set(1.3, 1.3);
stageCurtains.active = false; stageCurtains.active = false;
add(stageCurtains); add(stageCurtains);
} }
}
var gfVersion:String = 'gf'; var gfVersion:String = 'gf';