diff --git a/assets/preload/data/monster/monsterDialogue.txt b/assets/preload/data/monster/monsterDialogue1.txt similarity index 100% rename from assets/preload/data/monster/monsterDialogue.txt rename to assets/preload/data/monster/monsterDialogue1.txt diff --git a/assets/preload/data/monster/monsterDialogue2.txt b/assets/preload/data/monster/monsterDialogue2.txt new file mode 100644 index 0000000..1a58aed --- /dev/null +++ b/assets/preload/data/monster/monsterDialogue2.txt @@ -0,0 +1,7 @@ +:dad:i am the pumpkin head +:bf:what the fuck are you talking about man +:dad:i have like a fucking pumpkin for a head are you fucking stupid +:bf:go fuck yourself +:dad:you go fuck yourself +:dad:fuck your own ass sideways to the point where you cant fucking feel it anymore you fucking shithead kys +:bf:ok \ No newline at end of file diff --git a/assets/preload/data/south/southDialogue.txt b/assets/preload/data/south/southDialogue1.txt similarity index 100% rename from assets/preload/data/south/southDialogue.txt rename to assets/preload/data/south/southDialogue1.txt diff --git a/assets/preload/data/south/southDialogue2.txt b/assets/preload/data/south/southDialogue2.txt new file mode 100644 index 0000000..92dc480 --- /dev/null +++ b/assets/preload/data/south/southDialogue2.txt @@ -0,0 +1,5 @@ +:bf:ok that was pretty good i guess +:bf:so what now +:dad:well things are about to go south after this song +:dad:you might meet some monster or something +:bf:... \ No newline at end of file diff --git a/assets/preload/data/spookeez/spookeezDialogue.txt b/assets/preload/data/spookeez/spookeezDialogue1.txt similarity index 100% rename from assets/preload/data/spookeez/spookeezDialogue.txt rename to assets/preload/data/spookeez/spookeezDialogue1.txt diff --git a/assets/preload/data/spookeez/spookeezDialogue2.txt b/assets/preload/data/spookeez/spookeezDialogue2.txt new file mode 100644 index 0000000..03b7415 --- /dev/null +++ b/assets/preload/data/spookeez/spookeezDialogue2.txt @@ -0,0 +1,7 @@ +:dad:it is the spooky month +:bf:what the fuck +:dad:it is the spooky month +:bf:first of all +:bf:what the fuck are you 2 squeakers doing in my attic +:bf:second of all +:bf:IT IS THE MIDDLE OF JU- \ No newline at end of file diff --git a/source/CoolUtil.hx b/source/CoolUtil.hx index 6f840e2..8aa2e50 100644 --- a/source/CoolUtil.hx +++ b/source/CoolUtil.hx @@ -1,5 +1,6 @@ package; +import flixel.math.FlxRandom; import lime.utils.Assets; using StringTools; @@ -39,4 +40,9 @@ class CoolUtil } return dumbArray; } + + public static function randomArray(ar:Array):Dynamic { + var res = new FlxRandom().int(0, ar.length-1); + return ar[res]; + } } diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index ed5d658..bf4e159 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -31,12 +31,12 @@ class OptionsMenu extends MusicBeatState Universal: type - 2Type, name, - initial value 2Type: values = [val1, val2] currently selected value writtenValues = [textForVal1, textForVal2] + function that runs on change ] */ @@ -44,22 +44,48 @@ class OptionsMenu extends MusicBeatState [ // Keybinds "2Type", "Keybinds", - 0, - [0, 1], - 0, - ["DFJK", "WASD"] + "DFJK", + ["DFJK", "WASD"], + () -> { + if (SaveManagement.getOption("Keybinds") == "DFJK") + controls.setKeyboardScheme(KeyboardScheme.Solo, true); + else + controls.setKeyboardScheme(KeyboardScheme.Duo(true), true); + } + ], + [ // Inputs + "2Type", + "Input System", + "New", + ["New", "Old"], + null + ], + [ // Scroll Dir + "2Type", + "Scroll Direction", + "Up", + ["Up", "Down"], + null + ], + [ // Hitsounds + "2Type", + "Hitsounds", + "Off", + ["Off", "On"], + null ] ]; function restoreOptionValues() { - var it = 0; - trace(FlxG.save.data.options); + var it = 0; for (option in options.iterator()) { var type:String = option[0]; + var name:String = option[1]; switch (type) { case "2Type": - option[4] = FlxG.save.data.options[it]; + if (SaveManagement.getOption(name) != null) + option[2] = SaveManagement.getOption(name); default: trace("Invalid option type"); } @@ -69,7 +95,7 @@ class OptionsMenu extends MusicBeatState override function create() { - var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat')); + /*var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat')); controlsStrings = CoolUtil.coolStringFile( (FlxG.save.data.dfjk ? 'DFJK' : 'WASD') + "\n" + (FlxG.save.data.newInput ? "New input" : "Old Input") + "\n" + @@ -82,12 +108,12 @@ class OptionsMenu extends MusicBeatState menuBG.updateHitbox(); menuBG.screenCenter(); menuBG.antialiasing = true; - add(menuBG); + add(menuBG);*/ grpControls = new FlxTypedGroup(); add(grpControls); - /*restoreOptionValues(); + restoreOptionValues(); var it = 0; for (option in options.iterator()) { @@ -98,7 +124,7 @@ class OptionsMenu extends MusicBeatState changeOption(option, it, false); it++; - }*/ + } for (i in 0...controlsStrings.length) { @@ -146,8 +172,8 @@ class OptionsMenu extends MusicBeatState if (controls.ACCEPT) { - // changeOption(options[curSelected], curSelected); - if (curSelected != grpControls.length-1) + changeOption(options[curSelected], curSelected); + /*if (curSelected != grpControls.length-1) grpControls.remove(grpControls.members[curSelected]); switch(curSelected) { @@ -186,7 +212,7 @@ class OptionsMenu extends MusicBeatState ctrl.isMenuItem = true; ctrl.targetY = curSelected - 4; grpControls.add(ctrl); - } + }*/ } } @@ -233,19 +259,22 @@ class OptionsMenu extends MusicBeatState switch (type) { case "2Type": - var values = option[3]; - var curValue = option[4]; - var writtenValues = option[5]; + var curValue:String = option[2]; + var values:Array = option[3]; if (update) { - option[4] = curValue == 0 ? 1 : 0; - FlxG.save.data.options[selectNumber] = option[4]; + var cur = values.indexOf(curValue)+1; + option[2] = values[cur] == null ? values[0] : values[cur]; + + SaveManagement.setOption(name, option[2]); + + if (option[5] != null) option[5](); + + trace(name); + trace(SaveManagement.getOption(name)); } - trace(writtenValues); - trace(option[4]); - grpControls.members[selectNumber].text = name+": " + writtenValues[option[4]]; - trace("Changed value of " + name + " to " + option[4]); + grpControls.members[selectNumber].text = name+": " + Std.string(option[2]); default: trace("Incorrect option type"); } diff --git a/source/PlayState.hx b/source/PlayState.hx index 1ba4a37..50b31ca 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -49,6 +49,13 @@ import sys.FileSystem; class PlayState extends MusicBeatState { + public static var instance(get,null):PlayState; + public static function get_instance():PlayState { + if (instance == null) + instance = new PlayState(); + return instance; + } + public static var curStage:String = ''; public static var SONG:SwagSong; public static var isStoryMode:Bool = false; @@ -65,8 +72,6 @@ class PlayState extends MusicBeatState public static var isPixel:Bool = false; public static var isGood:Bool = false; - var halloweenLevel:Bool = false; - private var vocals:FlxSound; private var dad:Character; @@ -150,7 +155,7 @@ class PlayState extends MusicBeatState public static var campaignScore:Int = 0; - var defaultCamZoom:Float = 1.05; + public static var defaultCamZoom:Float = 1.05; public static var daPixelZoom:Float = 6; @@ -190,7 +195,10 @@ class PlayState extends MusicBeatState specialgf = true; } - theFunne = FlxG.save.data.newInput; + // theFunne = FlxG.save.data.newInput; + theFunne = SaveManagement.getOption("Input System") == "New"; + + trace(SaveManagement.getOption("Input System")); if (FlxG.sound.music != null) FlxG.sound.music.stop(); @@ -265,34 +273,6 @@ class PlayState extends MusicBeatState Conductor.mapBPMChanges(SONG); Conductor.changeBPM(SONG.bpm); - switch (SONG.song.toLowerCase().trim()) - { - case 'tutorial': - dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.']; - case 'bopeebo': - dialogue = [ - 'HEY!', - "You think you can just sing\nwith my daughter like that?", - "If you want to date her...", - "You're going to have to go \nthrough ME first!" - ]; - case 'fresh': - dialogue = ["Not too shabby boy.", ""]; - case 'dadbattle': - dialogue = [ - "gah you think you're hot stuff?", - "If you can beat me here...", - "Only then I will even CONSIDER letting you\ndate my daughter!" - ]; - case 'senpai': - dialogue = CoolUtil.coolTextFile(Paths.txt('senpai/senpaiDialogue')); - case 'roses': - dialogue = CoolUtil.coolTextFile(Paths.txt('roses/rosesDialogue')); - case 'thorns': - dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); - case 'winter-horrorland': - dialogue = CoolUtil.coolTextFile(Paths.txt('winter-horrorland/winter-horrorlandDialogue')); - } #if desktop if (hasDialogue) @@ -303,14 +283,35 @@ class PlayState extends MusicBeatState if (files[i].endsWith('.txt')) dialogueFiles.push(files[i].replace('.txt', '').trim()); } + + trace(dialogueFiles); dialogue = CoolUtil.coolTextFile(Paths.txt(SONG.song.toLowerCase().trim()+'/'+dialogueFiles[FlxG.random.int(0, dialogueFiles.length-1)])); } + #else + dialogue = [ + ":bf:GO FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:GO FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:GO FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:FUCK", + ":dad:FUCK", + ":bf:FUCK", + ":dad:GO FUCK YOURSELF", + ":bf:GO FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:GO FUCK YOURSELF", + ":dad:GO FUCK YOURSELF", + ":bf:GO FUCK YOURSELF" + ] #end if (SONG.stage == "spooky") { curStage = "spooky"; - halloweenLevel = true; var hallowTex = Paths.getSparrowAtlas('stages/halloween_bg'); @@ -815,7 +816,8 @@ class PlayState extends MusicBeatState strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10); strumLine.scrollFactor.set(); - if (FlxG.save.data.downscroll) + // if (FlxG.save.data.downscroll) + if (SaveManagement.getOption("Scroll Direction") == "Down") strumLine.y = FlxG.height - 165; strumLineNotes = new FlxTypedGroup(); @@ -1889,7 +1891,7 @@ class PlayState extends MusicBeatState daNote.destroy(); } - if (FlxG.save.data.downscroll) + if (SaveManagement.getOption("Scroll Direction") == "Down") daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2))); else daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); @@ -1897,7 +1899,7 @@ class PlayState extends MusicBeatState // WIP interpolation shit? Need to fix the pause issue // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed)); - if (daNote.y < -daNote.height && !FlxG.save.data.downscroll || daNote.y >= strumLine.y + 106 && FlxG.save.data.downscroll) + if (daNote.y < -daNote.height && SaveManagement.getOption("Scroll Direction") == "Up" || daNote.y >= strumLine.y + 106 && SaveManagement.getOption("Scroll Direction") == "Down") { if (daNote.isSustainNote && daNote.wasGoodHit) { @@ -2114,7 +2116,7 @@ class PlayState extends MusicBeatState if (daRating != 'shit' || daRating != 'bad') { - if (FlxG.save.data.hitsounds) + if (SaveManagement.getOption("Hitsounds") == "On") FlxG.sound.play(Paths.sound('hitsound')); songScore += score; diff --git a/source/SaveManagement.hx b/source/SaveManagement.hx index 542027b..6091e78 100644 --- a/source/SaveManagement.hx +++ b/source/SaveManagement.hx @@ -16,27 +16,15 @@ class SaveManagement { FlxG.sound.muted = FlxG.save.data.mute; // Options - if (FlxG.save.data.newInput == null) - FlxG.save.data.newInput = true; - - if (FlxG.save.data.downscroll == null) - FlxG.save.data.downscroll = false; - - if (FlxG.save.data.dfjk == null) - FlxG.save.data.dfjk = false; - - if (FlxG.save.data.freaky == null) - FlxG.save.data.freaky = false; - - if (FlxG.save.data.hitsounds == null) - FlxG.save.data.hitsounds = false; + if (FlxG.save.data.options == null) + defaultOptions(); // Shit that happened if (FlxG.save.data.unlockedFreeplay == null) FlxG.save.data.unlockedFreeplay = false; - if (FlxG.save.data.options == null) - FlxG.save.data.options = new Array(); + if (FlxG.save.data.frostedonespotted == null) + FlxG.save.data.frostedonespotted = false; } public static function unlockSong(song:String) { @@ -54,7 +42,26 @@ class SaveManagement { FlxG.save.data.freaky = false; FlxG.save.data.dfjk = false; FlxG.save.data.downscroll = false; + FlxG.save.data.unlockedFreeplay = false; + defaultOptions(); + } + + public static function defaultOptions() { + FlxG.save.data.options = new Map(); + + FlxG.save.data.options.set("Keybinds", "DFJK"); + FlxG.save.data.options.set("Input System", "New"); + FlxG.save.data.options.set("Scroll Direction", "Up"); + FlxG.save.data.options.set("Hitsounds", "Off"); + } + + public static function setOption(option:String, value:Dynamic):Void { + FlxG.save.data.options.set(option, value); + } + + public static function getOption(option:String):Dynamic { + return FlxG.save.data.options.get(option); } } \ No newline at end of file diff --git a/source/Stage.hx b/source/Stage.hx new file mode 100644 index 0000000..d0944d4 --- /dev/null +++ b/source/Stage.hx @@ -0,0 +1,334 @@ +import flixel.addons.effects.chainable.FlxWaveEffect; +import flixel.sound.FlxSound; +import flixel.FlxG; +import flixel.FlxSprite; +import flixel.group.FlxGroup.FlxTypedGroup; + +class Stage extends FlxTypedGroup { + var halloweenBG:FlxSprite; + var isHalloween:Bool = false; + + var phillyCityLights:FlxTypedGroup; + var phillyTrain:FlxSprite; + var trainSound:FlxSound; + + var picoShoot:FlxSprite; + var beefSafe:Bool = false; + var shootSound:FlxSound; + + var limo:FlxSprite; + var grpLimoDancers:FlxTypedGroup; + var fastCar:FlxSprite; + + var upperBoppers:FlxSprite; + var bottomBoppers:FlxSprite; + var santa:FlxSprite; + + var fc:Bool = true; + var allowMiss = true; + + var bgGirls:BackgroundGirls; + var wiggleShit:WiggleEffect = new WiggleEffect(); + + public function new(stage:String) { + super(); + + switch (stage) { + case "spooky": + PlayState.curStage = "spooky"; + + var hallowTex = Paths.getSparrowAtlas('stages/halloween_bg'); + + halloweenBG = new FlxSprite(-200, -100); + halloweenBG.frames = hallowTex; + halloweenBG.animation.addByPrefix('idle', 'halloweem bg0'); + halloweenBG.animation.addByPrefix('lightning', 'halloweem bg lightning strike', 24, false); + halloweenBG.animation.play('idle'); + halloweenBG.antialiasing = true; + add(halloweenBG); + + isHalloween = true; + case "exe": + PlayState.curStage = 'exe'; + + var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stages/exeback')); + bg.antialiasing = true; + bg.scrollFactor.set(0.9, 0.9); + bg.active = false; + add(bg); + + var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stages/exefront')); + stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); + stageFront.updateHitbox(); + stageFront.antialiasing = true; + stageFront.scrollFactor.set(0.9, 0.9); + stageFront.active = false; + add(stageFront); + case "philly": + PlayState.curStage = 'philly'; + + var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('stages/philly/sky')); + bg.scrollFactor.set(0.1, 0.1); + add(bg); + + var city:FlxSprite = new FlxSprite(-10).loadGraphic(Paths.image('stages/philly/city')); + city.scrollFactor.set(0.3, 0.3); + city.setGraphicSize(Std.int(city.width * 0.85)); + city.updateHitbox(); + add(city); + + phillyCityLights = new FlxTypedGroup(); + add(phillyCityLights); + + for (i in 0...5) + { + var light:FlxSprite = new FlxSprite(city.x).loadGraphic(Paths.image('stages/philly/win' + i)); + light.scrollFactor.set(0.3, 0.3); + light.visible = false; + light.setGraphicSize(Std.int(light.width * 0.85)); + light.updateHitbox(); + light.antialiasing = true; + phillyCityLights.add(light); + } + + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('stages/philly/behindTrain')); + add(streetBehind); + + phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('stages/philly/train')); + add(phillyTrain); + + 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(Paths.image('stages/philly/street')); + add(street); + case "limo": + PlayState.curStage = 'limo'; + PlayState.defaultCamZoom = 0.90; + + var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('stages/limo/limoSunset')); + skyBG.scrollFactor.set(0.1, 0.1); + add(skyBG); + + var bgLimo:FlxSprite = new FlxSprite(-200, 480); + bgLimo.frames = Paths.getSparrowAtlas('stages/limo/bgLimo'); + bgLimo.animation.addByPrefix('drive', "background limo pink", 24); + bgLimo.animation.play('drive'); + bgLimo.scrollFactor.set(0.4, 0.4); + add(bgLimo); + + grpLimoDancers = new FlxTypedGroup(); + add(grpLimoDancers); + + for (i in 0...5) + { + var dancer:BackgroundDancer = new BackgroundDancer((370 * i) + 130, bgLimo.y - 400); + dancer.scrollFactor.set(0.4, 0.4); + grpLimoDancers.add(dancer); + } + + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('stages/limo/limoOverlay')); + overlayShit.alpha = 0.5; + // add(overlayShit); + + // var shaderBullshit = new BlendModeEffect(new OverlayShader(), FlxColor.RED); + + // FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]); + + // overlayShit.shader = shaderBullshit; + + var limoTex = Paths.getSparrowAtlas('stages/limo/limoDrive'); + + limo = new FlxSprite(-120, 550); + limo.frames = limoTex; + limo.animation.addByPrefix('drive', "Limo stage", 24); + limo.animation.play('drive'); + limo.antialiasing = true; + + fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('stages/limo/fastCarLol')); + // add(limo); + case "mall": + PlayState.curStage = 'mall'; + + PlayState.defaultCamZoom = 0.80; + + var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('stages/christmas/bgWalls')); + bg.antialiasing = true; + bg.scrollFactor.set(0.2, 0.2); + bg.active = false; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); + + upperBoppers = new FlxSprite(-240, -90); + upperBoppers.frames = Paths.getSparrowAtlas('stages/christmas/upperBop'); + upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false); + upperBoppers.antialiasing = true; + upperBoppers.scrollFactor.set(0.33, 0.33); + upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); + upperBoppers.updateHitbox(); + add(upperBoppers); + + var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('stages/christmas/bgEscalator')); + bgEscalator.antialiasing = true; + bgEscalator.scrollFactor.set(0.3, 0.3); + bgEscalator.active = false; + bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); + bgEscalator.updateHitbox(); + add(bgEscalator); + + var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('stages/christmas/christmasTree')); + tree.antialiasing = true; + tree.scrollFactor.set(0.40, 0.40); + add(tree); + + bottomBoppers = new FlxSprite(-300, 140); + bottomBoppers.frames = Paths.getSparrowAtlas('stages/christmas/bottomBop'); + bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false); + bottomBoppers.antialiasing = true; + bottomBoppers.scrollFactor.set(0.9, 0.9); + bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1)); + bottomBoppers.updateHitbox(); + add(bottomBoppers); + + var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('stages/christmas/fgSnow')); + fgSnow.active = false; + fgSnow.antialiasing = true; + add(fgSnow); + + santa = new FlxSprite(-840, 150); + santa.frames = Paths.getSparrowAtlas('stages/christmas/santa'); + santa.animation.addByPrefix('idle', 'santa idle in fear', 24, true); + santa.animation.addByPrefix('DIE', 'santa DIE', 2, false); + santa.antialiasing = true; + add(santa); + santa.animation.play('idle', true); + case "mallEvil": + PlayState.curStage = 'mallEvil'; + var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('stages/christmas/evilBG')); + bg.antialiasing = true; + bg.scrollFactor.set(0.2, 0.2); + bg.active = false; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); + + var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('stages/christmas/evilTree')); + evilTree.antialiasing = true; + evilTree.scrollFactor.set(0.2, 0.2); + add(evilTree); + + var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("stages/christmas/evilSnow")); + evilSnow.antialiasing = true; + add(evilSnow); + case "school": + PlayState.curStage = 'school'; + + // defaultCamZoom = 0.9; + + var bgSky = new FlxSprite().loadGraphic(Paths.image('stages/weeb/weebSky')); + bgSky.scrollFactor.set(0.1, 0.1); + add(bgSky); + + var repositionShit = -200; + + var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('stages/weeb/weebSchool')); + bgSchool.scrollFactor.set(0.6, 0.90); + add(bgSchool); + + var bgStreet:FlxSprite = new FlxSprite(repositionShit).loadGraphic(Paths.image('stages/weeb/weebStreet')); + bgStreet.scrollFactor.set(0.95, 0.95); + add(bgStreet); + + var fgTrees:FlxSprite = new FlxSprite(repositionShit + 170, 130).loadGraphic(Paths.image('stages/weeb/weebTreesBack')); + fgTrees.scrollFactor.set(0.9, 0.9); + add(fgTrees); + + var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800); + var treetex = Paths.getPackerAtlas('stages/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'); + bgTrees.scrollFactor.set(0.85, 0.85); + add(bgTrees); + + var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); + treeLeaves.frames = Paths.getSparrowAtlas('stages/weeb/petals'); + treeLeaves.animation.addByPrefix('leaves', 'PETALS ALL', 24, true); + treeLeaves.animation.play('leaves'); + treeLeaves.scrollFactor.set(0.85, 0.85); + add(treeLeaves); + + var widShit = Std.int(bgSky.width * 6); + + bgSky.setGraphicSize(widShit); + bgSchool.setGraphicSize(widShit); + bgStreet.setGraphicSize(widShit); + bgTrees.setGraphicSize(Std.int(widShit * 1.4)); + fgTrees.setGraphicSize(Std.int(widShit * 0.8)); + treeLeaves.setGraphicSize(widShit); + + fgTrees.updateHitbox(); + bgSky.updateHitbox(); + bgSchool.updateHitbox(); + bgStreet.updateHitbox(); + bgTrees.updateHitbox(); + treeLeaves.updateHitbox(); + + bgGirls = new BackgroundGirls(-100, 190); + bgGirls.scrollFactor.set(0.9, 0.9); + + if (PlayState.SONG.song.toLowerCase() == 'roses') + { + bgGirls.getScared(); + } + + bgGirls.setGraphicSize(Std.int(bgGirls.width * PlayState.daPixelZoom)); + bgGirls.updateHitbox(); + add(bgGirls); + case "schoolEvil": + PlayState.curStage = 'schoolEvil'; + + var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2); + var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2); + + var posX = 400; + var posY = 200; + + var bg:FlxSprite = new FlxSprite(posX, posY); + bg.frames = Paths.getSparrowAtlas('stages/weeb/animatedEvilSchool'); + bg.animation.addByPrefix('idle', 'background 2', 24); + bg.animation.play('idle'); + bg.scrollFactor.set(0.8, 0.9); + bg.scale.set(6, 6); + add(bg); + default: + PlayState.defaultCamZoom = 0.9; + PlayState.curStage = 'stage'; + var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stages/stageback')); + bg.antialiasing = true; + bg.scrollFactor.set(0.9, 0.9); + bg.active = false; + add(bg); + + var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stages/stagefront')); + stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); + stageFront.updateHitbox(); + stageFront.antialiasing = true; + stageFront.scrollFactor.set(0.9, 0.9); + stageFront.active = false; + add(stageFront); + + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stages/stagecurtains')); + stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); + stageCurtains.updateHitbox(); + stageCurtains.antialiasing = true; + stageCurtains.scrollFactor.set(1.3, 1.3); + stageCurtains.active = false; + + add(stageCurtains); + } + } +} \ No newline at end of file