From c90b35011f719f2b5f850d959031a634373dd90a Mon Sep 17 00:00:00 2001 From: M&M Date: Fri, 26 Feb 2021 15:43:20 -0800 Subject: [PATCH 1/8] girlfriend finally cheers --- source/PlayState.hx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index aabb992f5..b6fc1865c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2300,11 +2300,12 @@ class PlayState extends MusicBeatState if (curBeat % 8 == 7 && curSong == 'Bopeebo') { boyfriend.playAnim('hey', true); + } - if (SONG.song == 'Tutorial' && dad.curCharacter == 'gf') - { - dad.playAnim('cheer', true); - } + if (curBeat % 16 == 15 && SONG.song == 'Tutorial' && dad.curCharacter == 'gf' && curBeat > 16 && curBeat < 48) + { + boyfriend.playAnim('hey', true); + dad.playAnim('cheer', true); } switch (curStage) From 4bfa84a8c3c3bd123c2727a12f4cef617b2c2c46 Mon Sep 17 00:00:00 2001 From: Tenta <72235309+TentaRJ@users.noreply.github.com> Date: Thu, 18 Mar 2021 22:26:23 -0400 Subject: [PATCH 2/8] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2c40ffc1c..d74a3f4ff 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,11 @@ newgrounds ``` So for each of those type `haxelib install [library]` so shit like `haxelib install newgrounds` -You'll also need to install polymod. To do this, you need to do a few things first. +You'll also need to install a couple things that involve Gits. To do this, you need to do a few things first. 1. Download [git-scm](https://git-scm.com/downloads). Works for Windows, Mac, and Linux, just select your build. 2. Follow instructions to install the application properly. -3. Run `haxelib git polymod https://github.com/larsiusprime/polymod.git` in terminal/command-prompt after your git program is installed. +3. Run `haxelib git polymod https://github.com/larsiusprime/polymod.git` to install Polymod. +4. Run `haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc` to install Discord RPC. You should have everything ready for compiling the game! Follow the guide below to continue! From 65ec185c6b12d4ac900895e3739d105c489a49bc Mon Sep 17 00:00:00 2001 From: Voltrex <62040526+VoltrexMaster@users.noreply.github.com> Date: Wed, 24 Mar 2021 18:43:17 +0430 Subject: [PATCH 3/8] feat(performance): Use switch statement Use a `switch` statement instead of a huge `if .. else if` chains. --- source/PlayState.hx | 553 ++++++++++++++++++++++---------------------- 1 file changed, 278 insertions(+), 275 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index aa41737ea..33ea56880 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -227,344 +227,347 @@ class PlayState extends MusicBeatState DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC); #end - if (SONG.song.toLowerCase() == 'spookeez' || SONG.song.toLowerCase() == 'monster' || SONG.song.toLowerCase() == 'south') + switch (SONG.song.toLowerCase()) { - curStage = "spooky"; - halloweenLevel = true; + case 'spookeez' | 'monster' | 'south': + { + curStage = 'spooky'; + halloweenLevel = true; - var hallowTex = Paths.getSparrowAtlas('halloween_bg'); + var hallowTex = Paths.getSparrowAtlas('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); + 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; - } - else if (SONG.song.toLowerCase() == 'pico' || SONG.song.toLowerCase() == 'blammed' || SONG.song.toLowerCase() == 'philly') - { - curStage = 'philly'; + isHalloween = true; + } + case 'pico' | 'blammed' | 'philly': + { + curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('philly/sky')); - bg.scrollFactor.set(0.1, 0.1); - add(bg); + 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(Paths.image('philly/city')); - city.scrollFactor.set(0.3, 0.3); - city.setGraphicSize(Std.int(city.width * 0.85)); - city.updateHitbox(); - add(city); + 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(); + add(city); - phillyCityLights = new FlxTypedGroup(); - add(phillyCityLights); + phillyCityLights = new FlxTypedGroup(); + add(phillyCityLights); - for (i in 0...5) - { - 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)); - light.updateHitbox(); - light.antialiasing = true; - phillyCityLights.add(light); - } + for (i in 0...5) + { + 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)); + light.updateHitbox(); + light.antialiasing = true; + phillyCityLights.add(light); + } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain')); - add(streetBehind); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain')); + add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train')); - add(phillyTrain); + phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train')); + add(phillyTrain); - trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes')); - FlxG.sound.list.add(trainSound); + trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes')); + 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')); - add(street); - } - else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') - { - curStage = 'limo'; - defaultCamZoom = 0.90; + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street')); + add(street); + } + case 'milf' | 'satin-panties' | 'high': + { + curStage = 'limo'; + defaultCamZoom = 0.90; - var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset')); - skyBG.scrollFactor.set(0.1, 0.1); - add(skyBG); + 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 = Paths.getSparrowAtlas('limo/bgLimo'); - bgLimo.animation.addByPrefix('drive', "background limo pink", 24); - bgLimo.animation.play('drive'); - bgLimo.scrollFactor.set(0.4, 0.4); - add(bgLimo); + var bgLimo:FlxSprite = new FlxSprite(-200, 480); + 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); + add(bgLimo); - grpLimoDancers = new FlxTypedGroup(); - add(grpLimoDancers); + 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); - } + 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('limo/limoOverlay')); - overlayShit.alpha = 0.5; - // add(overlayShit); + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('limo/limoOverlay')); + overlayShit.alpha = 0.5; + // 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.frames = limoTex; - limo.animation.addByPrefix('drive', "Limo stage", 24); - limo.animation.play('drive'); - limo.antialiasing = true; + 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('limo/fastCarLol')); - // add(limo); - } - else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog') - { - curStage = 'mall'; + fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol')); + // add(limo); + } + case 'cocoa' | 'eggnog': + { + curStage = 'mall'; - defaultCamZoom = 0.80; + defaultCamZoom = 0.80; - 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; - bg.setGraphicSize(Std.int(bg.width * 0.8)); - bg.updateHitbox(); - add(bg); + 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; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); - upperBoppers = new FlxSprite(-240, -90); - 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); - upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); - upperBoppers.updateHitbox(); - add(upperBoppers); + upperBoppers = new FlxSprite(-240, -90); + 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); + upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); + upperBoppers.updateHitbox(); + add(upperBoppers); - 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; - bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); - bgEscalator.updateHitbox(); - add(bgEscalator); + 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; + bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); + bgEscalator.updateHitbox(); + add(bgEscalator); - var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree')); - tree.antialiasing = true; - tree.scrollFactor.set(0.40, 0.40); - add(tree); + 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 = Paths.getSparrowAtlas('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); + bottomBoppers = new FlxSprite(-300, 140); + 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); + bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1)); + bottomBoppers.updateHitbox(); + add(bottomBoppers); - var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow')); - fgSnow.active = false; - fgSnow.antialiasing = true; - add(fgSnow); + 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 = Paths.getSparrowAtlas('christmas/santa'); - santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); - santa.antialiasing = true; - add(santa); - } - else if (SONG.song.toLowerCase() == 'winter-horrorland') - { - curStage = 'mallEvil'; - 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; - bg.setGraphicSize(Std.int(bg.width * 0.8)); - bg.updateHitbox(); - add(bg); + santa = new FlxSprite(-840, 150); + santa.frames = Paths.getSparrowAtlas('christmas/santa'); + santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); + santa.antialiasing = true; + add(santa); + } + case 'winter-horrorland': + { + curStage = 'mallEvil'; + 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; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); - 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 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(Paths.image("christmas/evilSnow")); - evilSnow.antialiasing = true; - add(evilSnow); - } - else if (SONG.song.toLowerCase() == 'senpai' || SONG.song.toLowerCase() == 'roses') - { - curStage = 'school'; + var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow")); + evilSnow.antialiasing = true; + add(evilSnow); + } + case 'senpai' | 'roses': + { + curStage = 'school'; - // defaultCamZoom = 0.9; + // defaultCamZoom = 0.9; - var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky')); - bgSky.scrollFactor.set(0.1, 0.1); - add(bgSky); + var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky')); + bgSky.scrollFactor.set(0.1, 0.1); + add(bgSky); - var repositionShit = -200; + var repositionShit = -200; - var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('weeb/weebSchool')); - bgSchool.scrollFactor.set(0.6, 0.90); - add(bgSchool); + 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(Paths.image('weeb/weebStreet')); - bgStreet.scrollFactor.set(0.95, 0.95); - add(bgStreet); + 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(Paths.image('weeb/weebTreesBack')); - fgTrees.scrollFactor.set(0.9, 0.9); - add(fgTrees); + 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 = 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'); - bgTrees.scrollFactor.set(0.85, 0.85); - add(bgTrees); + var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800); + 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'); + bgTrees.scrollFactor.set(0.85, 0.85); + add(bgTrees); - var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); - 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); - add(treeLeaves); + var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); + 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); + add(treeLeaves); - var widShit = Std.int(bgSky.width * 6); + 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); + 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(); + fgTrees.updateHitbox(); + bgSky.updateHitbox(); + bgSchool.updateHitbox(); + bgStreet.updateHitbox(); + bgTrees.updateHitbox(); + treeLeaves.updateHitbox(); - bgGirls = new BackgroundGirls(-100, 190); - bgGirls.scrollFactor.set(0.9, 0.9); + bgGirls = new BackgroundGirls(-100, 190); + bgGirls.scrollFactor.set(0.9, 0.9); - if (SONG.song.toLowerCase() == 'roses') - { - bgGirls.getScared(); - } + if (SONG.song.toLowerCase() == 'roses') + { + bgGirls.getScared(); + } - bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); - bgGirls.updateHitbox(); - add(bgGirls); - } - else if (SONG.song.toLowerCase() == 'thorns') - { - curStage = 'schoolEvil'; + bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); + bgGirls.updateHitbox(); + add(bgGirls); + } + case 'thorns': + { + curStage = 'schoolEvil'; - var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2); - var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2); + 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 posX = 400; + var posY = 200; - var bg:FlxSprite = new FlxSprite(posX, posY); - bg.frames = Paths.getSparrowAtlas('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); + var bg:FlxSprite = new FlxSprite(posX, posY); + bg.frames = Paths.getSparrowAtlas('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); - /* - 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 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(Paths.image('weeb/evilSchoolFG')); - fg.scale.set(6, 6); - // fg.setGraphicSize(Std.int(fg.width * 6)); - // fg.updateHitbox(); - add(fg); + 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(); + add(fg); - wiggleShit.effectType = WiggleEffectType.DREAMY; - wiggleShit.waveAmplitude = 0.01; - wiggleShit.waveFrequency = 60; - wiggleShit.waveSpeed = 0.8; - */ + wiggleShit.effectType = WiggleEffectType.DREAMY; + wiggleShit.waveAmplitude = 0.01; + wiggleShit.waveFrequency = 60; + wiggleShit.waveSpeed = 0.8; + */ - // bg.shader = wiggleShit.shader; - // fg.shader = wiggleShit.shader; + // bg.shader = wiggleShit.shader; + // fg.shader = wiggleShit.shader; - /* - var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); - var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); + /* + var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); + var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); - // Using scale since setGraphicSize() doesnt work??? - waveSprite.scale.set(6, 6); - waveSpriteFG.scale.set(6, 6); - waveSprite.setPosition(posX, posY); - waveSpriteFG.setPosition(posX, posY); + // Using scale since setGraphicSize() doesnt work??? + waveSprite.scale.set(6, 6); + waveSpriteFG.scale.set(6, 6); + waveSprite.setPosition(posX, posY); + waveSpriteFG.setPosition(posX, posY); - waveSprite.scrollFactor.set(0.7, 0.8); - waveSpriteFG.scrollFactor.set(0.9, 0.8); + waveSprite.scrollFactor.set(0.7, 0.8); + waveSpriteFG.scrollFactor.set(0.9, 0.8); - // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); - // waveSprite.updateHitbox(); - // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); - // waveSpriteFG.updateHitbox(); + // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); + // waveSprite.updateHitbox(); + // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); + // waveSpriteFG.updateHitbox(); - add(waveSprite); - add(waveSpriteFG); - */ - } - else - { - defaultCamZoom = 0.9; - curStage = 'stage'; - 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); + add(waveSprite); + add(waveSpriteFG); + */ + } + default: + { + defaultCamZoom = 0.9; + curStage = 'stage'; + 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(Paths.image('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 stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('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('stagecurtains')); - stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); - stageCurtains.updateHitbox(); - stageCurtains.antialiasing = true; - stageCurtains.scrollFactor.set(1.3, 1.3); - stageCurtains.active = false; + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('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); - } + add(stageCurtains); + } + } var gfVersion:String = 'gf'; From c7d4f1d2ba8c9770bf49e84874d0e4a6118c41e5 Mon Sep 17 00:00:00 2001 From: Voltrex <62040526+VoltrexMaster@users.noreply.github.com> Date: Mon, 29 Mar 2021 04:16:32 +0430 Subject: [PATCH 4/8] feat(extra): Remove extra imports Remove 2 extra imports, `IOErrorEvent` was imported already. --- source/ChartingState.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 64a0de8fb..9ad46f1be 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -28,8 +28,6 @@ import haxe.Json; import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; -import openfl.events.IOErrorEvent; -import openfl.events.IOErrorEvent; import openfl.media.Sound; import openfl.net.FileReference; import openfl.utils.ByteArray; From 0279da5026ff10d1c5a7026872b02ba2730e6042 Mon Sep 17 00:00:00 2001 From: Voltrex <62040526+VoltrexMaster@users.noreply.github.com> Date: Mon, 29 Mar 2021 18:17:41 +0430 Subject: [PATCH 5/8] Fix indentation 2 -> 7 tabs. --- source/PlayState.hx | 552 ++++++++++++++++++++++---------------------- 1 file changed, 276 insertions(+), 276 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 33ea56880..d07e5265d 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -229,344 +229,344 @@ class PlayState extends MusicBeatState switch (SONG.song.toLowerCase()) { - case 'spookeez' | 'monster' | 'south': - { - curStage = 'spooky'; - halloweenLevel = true; + case 'spookeez' | 'monster' | 'south': + { + curStage = 'spooky'; + halloweenLevel = true; - var hallowTex = Paths.getSparrowAtlas('halloween_bg'); + var hallowTex = Paths.getSparrowAtlas('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); + 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 'pico' | 'blammed' | 'philly': - { - curStage = 'philly'; + isHalloween = true; + } + case 'pico' | 'blammed' | 'philly': + { + curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic(Paths.image('philly/sky')); - bg.scrollFactor.set(0.1, 0.1); - add(bg); + 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(Paths.image('philly/city')); - city.scrollFactor.set(0.3, 0.3); - city.setGraphicSize(Std.int(city.width * 0.85)); - city.updateHitbox(); - add(city); + 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(); + add(city); - phillyCityLights = new FlxTypedGroup(); - add(phillyCityLights); + phillyCityLights = new FlxTypedGroup(); + add(phillyCityLights); - for (i in 0...5) - { - 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)); - light.updateHitbox(); - light.antialiasing = true; - phillyCityLights.add(light); - } + for (i in 0...5) + { + 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)); + light.updateHitbox(); + light.antialiasing = true; + phillyCityLights.add(light); + } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain')); - add(streetBehind); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(Paths.image('philly/behindTrain')); + add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train')); - add(phillyTrain); + phillyTrain = new FlxSprite(2000, 360).loadGraphic(Paths.image('philly/train')); + add(phillyTrain); - trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes')); - FlxG.sound.list.add(trainSound); + trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes')); + 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')); - add(street); - } - case 'milf' | 'satin-panties' | 'high': - { - curStage = 'limo'; - defaultCamZoom = 0.90; + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street')); + add(street); + } + case 'milf' | 'satin-panties' | 'high': + { + curStage = 'limo'; + defaultCamZoom = 0.90; - var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset')); - skyBG.scrollFactor.set(0.1, 0.1); - add(skyBG); + 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 = Paths.getSparrowAtlas('limo/bgLimo'); - bgLimo.animation.addByPrefix('drive', "background limo pink", 24); - bgLimo.animation.play('drive'); - bgLimo.scrollFactor.set(0.4, 0.4); - add(bgLimo); + var bgLimo:FlxSprite = new FlxSprite(-200, 480); + 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); + add(bgLimo); - grpLimoDancers = new FlxTypedGroup(); - add(grpLimoDancers); + 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); - } + 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('limo/limoOverlay')); - overlayShit.alpha = 0.5; - // add(overlayShit); + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(Paths.image('limo/limoOverlay')); + overlayShit.alpha = 0.5; + // 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.frames = limoTex; - limo.animation.addByPrefix('drive', "Limo stage", 24); - limo.animation.play('drive'); - limo.antialiasing = true; + 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('limo/fastCarLol')); - // add(limo); - } - case 'cocoa' | 'eggnog': - { - curStage = 'mall'; + fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol')); + // add(limo); + } + case 'cocoa' | 'eggnog': + { + curStage = 'mall'; - defaultCamZoom = 0.80; + defaultCamZoom = 0.80; - 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; - bg.setGraphicSize(Std.int(bg.width * 0.8)); - bg.updateHitbox(); - add(bg); + 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; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); - upperBoppers = new FlxSprite(-240, -90); - 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); - upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); - upperBoppers.updateHitbox(); - add(upperBoppers); + upperBoppers = new FlxSprite(-240, -90); + 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); + upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85)); + upperBoppers.updateHitbox(); + add(upperBoppers); - 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; - bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); - bgEscalator.updateHitbox(); - add(bgEscalator); + 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; + bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9)); + bgEscalator.updateHitbox(); + add(bgEscalator); - var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree')); - tree.antialiasing = true; - tree.scrollFactor.set(0.40, 0.40); - add(tree); + 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 = Paths.getSparrowAtlas('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); + bottomBoppers = new FlxSprite(-300, 140); + 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); + bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1)); + bottomBoppers.updateHitbox(); + add(bottomBoppers); - var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow')); - fgSnow.active = false; - fgSnow.antialiasing = true; - add(fgSnow); + 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 = Paths.getSparrowAtlas('christmas/santa'); - santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); - santa.antialiasing = true; - add(santa); - } - case 'winter-horrorland': - { - curStage = 'mallEvil'; - 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; - bg.setGraphicSize(Std.int(bg.width * 0.8)); - bg.updateHitbox(); - add(bg); + santa = new FlxSprite(-840, 150); + santa.frames = Paths.getSparrowAtlas('christmas/santa'); + santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false); + santa.antialiasing = true; + add(santa); + } + case 'winter-horrorland': + { + curStage = 'mallEvil'; + 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; + bg.setGraphicSize(Std.int(bg.width * 0.8)); + bg.updateHitbox(); + add(bg); - 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 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(Paths.image("christmas/evilSnow")); - evilSnow.antialiasing = true; - add(evilSnow); - } - case 'senpai' | 'roses': - { - curStage = 'school'; + var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow")); + evilSnow.antialiasing = true; + add(evilSnow); + } + case 'senpai' | 'roses': + { + curStage = 'school'; - // defaultCamZoom = 0.9; + // defaultCamZoom = 0.9; - var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky')); - bgSky.scrollFactor.set(0.1, 0.1); - add(bgSky); + var bgSky = new FlxSprite().loadGraphic(Paths.image('weeb/weebSky')); + bgSky.scrollFactor.set(0.1, 0.1); + add(bgSky); - var repositionShit = -200; + var repositionShit = -200; - var bgSchool:FlxSprite = new FlxSprite(repositionShit, 0).loadGraphic(Paths.image('weeb/weebSchool')); - bgSchool.scrollFactor.set(0.6, 0.90); - add(bgSchool); + 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(Paths.image('weeb/weebStreet')); - bgStreet.scrollFactor.set(0.95, 0.95); - add(bgStreet); + 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(Paths.image('weeb/weebTreesBack')); - fgTrees.scrollFactor.set(0.9, 0.9); - add(fgTrees); + 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 = 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'); - bgTrees.scrollFactor.set(0.85, 0.85); - add(bgTrees); + var bgTrees:FlxSprite = new FlxSprite(repositionShit - 380, -800); + 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'); + bgTrees.scrollFactor.set(0.85, 0.85); + add(bgTrees); - var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); - 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); - add(treeLeaves); + var treeLeaves:FlxSprite = new FlxSprite(repositionShit, -40); + 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); + add(treeLeaves); - var widShit = Std.int(bgSky.width * 6); + 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); + 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(); + fgTrees.updateHitbox(); + bgSky.updateHitbox(); + bgSchool.updateHitbox(); + bgStreet.updateHitbox(); + bgTrees.updateHitbox(); + treeLeaves.updateHitbox(); - bgGirls = new BackgroundGirls(-100, 190); - bgGirls.scrollFactor.set(0.9, 0.9); + bgGirls = new BackgroundGirls(-100, 190); + bgGirls.scrollFactor.set(0.9, 0.9); - if (SONG.song.toLowerCase() == 'roses') - { - bgGirls.getScared(); - } + if (SONG.song.toLowerCase() == 'roses') + { + bgGirls.getScared(); + } - bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); - bgGirls.updateHitbox(); - add(bgGirls); - } - case 'thorns': - { - curStage = 'schoolEvil'; + bgGirls.setGraphicSize(Std.int(bgGirls.width * daPixelZoom)); + bgGirls.updateHitbox(); + add(bgGirls); + } + case 'thorns': + { + curStage = 'schoolEvil'; - var waveEffectBG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 3, 2); - var waveEffectFG = new FlxWaveEffect(FlxWaveMode.ALL, 2, -1, 5, 2); + 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 posX = 400; + var posY = 200; - var bg:FlxSprite = new FlxSprite(posX, posY); - bg.frames = Paths.getSparrowAtlas('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); + var bg:FlxSprite = new FlxSprite(posX, posY); + bg.frames = Paths.getSparrowAtlas('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); - /* - 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 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(Paths.image('weeb/evilSchoolFG')); - fg.scale.set(6, 6); - // fg.setGraphicSize(Std.int(fg.width * 6)); - // fg.updateHitbox(); - add(fg); + 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(); + add(fg); - wiggleShit.effectType = WiggleEffectType.DREAMY; - wiggleShit.waveAmplitude = 0.01; - wiggleShit.waveFrequency = 60; - wiggleShit.waveSpeed = 0.8; - */ + wiggleShit.effectType = WiggleEffectType.DREAMY; + wiggleShit.waveAmplitude = 0.01; + wiggleShit.waveFrequency = 60; + wiggleShit.waveSpeed = 0.8; + */ - // bg.shader = wiggleShit.shader; - // fg.shader = wiggleShit.shader; + // bg.shader = wiggleShit.shader; + // fg.shader = wiggleShit.shader; - /* - var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); - var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); + /* + var waveSprite = new FlxEffectSprite(bg, [waveEffectBG]); + var waveSpriteFG = new FlxEffectSprite(fg, [waveEffectFG]); - // Using scale since setGraphicSize() doesnt work??? - waveSprite.scale.set(6, 6); - waveSpriteFG.scale.set(6, 6); - waveSprite.setPosition(posX, posY); - waveSpriteFG.setPosition(posX, posY); + // Using scale since setGraphicSize() doesnt work??? + waveSprite.scale.set(6, 6); + waveSpriteFG.scale.set(6, 6); + waveSprite.setPosition(posX, posY); + waveSpriteFG.setPosition(posX, posY); - waveSprite.scrollFactor.set(0.7, 0.8); - waveSpriteFG.scrollFactor.set(0.9, 0.8); + waveSprite.scrollFactor.set(0.7, 0.8); + waveSpriteFG.scrollFactor.set(0.9, 0.8); - // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); - // waveSprite.updateHitbox(); - // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); - // waveSpriteFG.updateHitbox(); + // waveSprite.setGraphicSize(Std.int(waveSprite.width * 6)); + // waveSprite.updateHitbox(); + // waveSpriteFG.setGraphicSize(Std.int(fg.width * 6)); + // waveSpriteFG.updateHitbox(); - add(waveSprite); - add(waveSpriteFG); - */ - } - default: - { - defaultCamZoom = 0.9; - curStage = 'stage'; - 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); + add(waveSprite); + add(waveSpriteFG); + */ + } + default: + { + defaultCamZoom = 0.9; + curStage = 'stage'; + 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(Paths.image('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 stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('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('stagecurtains')); - stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); - stageCurtains.updateHitbox(); - stageCurtains.antialiasing = true; - stageCurtains.scrollFactor.set(1.3, 1.3); - stageCurtains.active = false; + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('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); - } + add(stageCurtains); + } } var gfVersion:String = 'gf'; From 0ad4ad3906f10ff7237c979b53ef1251eb958cd8 Mon Sep 17 00:00:00 2001 From: actuallyasmartname <77011692+actuallyasmartname@users.noreply.github.com> Date: Wed, 31 Mar 2021 18:52:07 -0400 Subject: [PATCH 6/8] Make link for downloads the latest version, not the Ludum Dare prototype --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5ac18ab6..5c916f831 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ THESE INSTRUCTIONS ARE FOR COMPILING THE GAME'S SOURCE CODE!!! IF YOU WANT TO JUST DOWNLOAD AND INSTALL AND PLAY THE GAME NORMALLY, GO TO ITCH.IO TO DOWNLOAD THE GAME FOR PC, MAC, AND LINUX!! -https://ninja-muffin24.itch.io/friday-night-funkin +https://ninja-muffin24.itch.io/funkin IF YOU WANT TO COMPILE THE GAME YOURSELF, CONTINUE READING!!! From 76ebfef57193aa019848b25fc289a24cf42fec04 Mon Sep 17 00:00:00 2001 From: Kade M Date: Fri, 2 Apr 2021 14:35:14 -0700 Subject: [PATCH 7/8] close the thing on the dead --- source/TitleState.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/TitleState.hx b/source/TitleState.hx index c91dc54eb..e643ac1a8 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -96,6 +96,10 @@ class TitleState extends MusicBeatState #if desktop DiscordClient.initialize(); + + Application.current.onExit.add (function (exitCode) { + DiscordClient.shutdown(); + }); #end } From c07533c0c3c117ecdbd97f20bf8bcdf0e162e052 Mon Sep 17 00:00:00 2001 From: Kade M Date: Fri, 2 Apr 2021 14:37:58 -0700 Subject: [PATCH 8/8] add the fucntioln --- source/Discord.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Discord.hx b/source/Discord.hx index 253a4f59a..2802e87c7 100644 --- a/source/Discord.hx +++ b/source/Discord.hx @@ -28,6 +28,11 @@ class DiscordClient DiscordRpc.shutdown(); } + public static function shutdown() + { + DiscordRpc.shutdown(); + } + static function onReady() { DiscordRpc.presence({