From d7f64075787314b4672b3e138b64c72fe7d4a002 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Mar 2021 00:46:28 -0500 Subject: [PATCH 01/15] freeplay stuff in progress --- source/FreeplayState.hx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 6dec6f1a6..d13f74d9b 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -7,6 +7,7 @@ import flixel.addons.display.FlxGridOverlay; import flixel.group.FlxGroup.FlxTypedGroup; import flixel.math.FlxMath; import flixel.text.FlxText; +import flixel.tweens.FlxTween; import flixel.util.FlxColor; import lime.utils.Assets; @@ -25,10 +26,13 @@ class FreeplayState extends MusicBeatState var lerpScore:Int = 0; var intendedScore:Int = 0; + var coolColors:Array = [0xff223344, 0xff123456, 0xFFFFFFFF, 0xFFADAD]; + private var grpSongs:FlxTypedGroup; private var curPlaying:Bool = false; private var iconArray:Array = []; + var bg:FlxSprite; override function create() { @@ -75,7 +79,7 @@ class FreeplayState extends MusicBeatState // LOAD CHARACTERS - var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuBGBlue')); + bg = new FlxSprite().loadGraphic(Paths.image('menuDesat')); add(bg); grpSongs = new FlxTypedGroup(); @@ -105,7 +109,7 @@ class FreeplayState extends MusicBeatState scoreText.setFormat(Paths.font("vcr.ttf"), 32, FlxColor.WHITE, RIGHT); // scoreText.alignment = RIGHT; - var scoreBG:FlxSprite = new FlxSprite(scoreText.x - 6, 0).makeGraphic(Std.int(FlxG.width * 0.35), 66, 0xFF000000); + var scoreBG:FlxSprite = new FlxSprite(scoreText.x - 6, 0).makeGraphic(Std.int(FlxG.width * 0.3), 66, 0xFF000000); scoreBG.alpha = 0.6; add(scoreBG); @@ -178,6 +182,7 @@ class FreeplayState extends MusicBeatState } lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4)); + bg.color = FlxColor.interpolate(bg.color, coolColors[curSelected % coolColors.length], 0.045); if (Math.abs(lerpScore - intendedScore) <= 10) lerpScore = intendedScore; @@ -236,15 +241,11 @@ class FreeplayState extends MusicBeatState intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty); #end - switch (curDifficulty) - { - case 0: - diffText.text = "EASY"; - case 1: - diffText.text = 'NORMAL'; - case 2: - diffText.text = "HARD"; - } + PlayState.storyDifficulty = curDifficulty; + + diffText.text = "< " + CoolUtil.difficultyString() + " >"; + diffText.x = FlxG.width * 0.85; + diffText.x -= (diffText.width / 2); } function changeSelection(change:Int = 0) From 9b5802e1d06bb5e578d8e692e27806fe7b7b5472 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 2 Mar 2021 04:30:25 -0500 Subject: [PATCH 02/15] monster and shit --- source/Character.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 810d21047..e8140a3a9 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -207,10 +207,10 @@ class Character extends FlxSprite animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); addOffset('idle'); - addOffset("singUP", -20, 50); - addOffset("singRIGHT", -51); - addOffset("singLEFT", -30); - addOffset("singDOWN", -30, -40); + addOffset("singUP", -20, 94); + addOffset("singRIGHT", -51, 30); + addOffset("singLEFT", -30, 20); + addOffset("singDOWN", -50, -80); playAnim('idle'); case 'monster-christmas': tex = Paths.getSparrowAtlas('christmas/monsterChristmas'); From 6d002a8ef8e325f10b4e3220634722f74dde215c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 4 Mar 2021 03:00:48 -0500 Subject: [PATCH 03/15] stuff for week 7 --- Project.xml | 4 +++ source/AnimationDebug.hx | 64 ++++++++++++++++++++++++++++++++++++++++ source/Character.hx | 30 +++++++++++++++++++ source/FreeplayState.hx | 3 ++ 4 files changed, 101 insertions(+) diff --git a/Project.xml b/Project.xml index 7edddb77c..eca6f8b0a 100644 --- a/Project.xml +++ b/Project.xml @@ -57,6 +57,7 @@ +
@@ -69,6 +70,7 @@ +
@@ -89,6 +91,8 @@ + + diff --git a/source/AnimationDebug.hx b/source/AnimationDebug.hx index 05b40d632..15454ef49 100644 --- a/source/AnimationDebug.hx +++ b/source/AnimationDebug.hx @@ -8,6 +8,11 @@ import flixel.addons.display.FlxGridOverlay; import flixel.group.FlxGroup.FlxTypedGroup; import flixel.text.FlxText; import flixel.util.FlxColor; +import openfl.events.Event; +import openfl.events.IOErrorEvent; +import openfl.net.FileReference; + +using StringTools; /** *DEBUG MODE @@ -190,6 +195,65 @@ class AnimationDebug extends FlxState char.playAnim(animList[curAnim]); } + if (FlxG.keys.justPressed.ESCAPE) + { + var outputString:String = ""; + + for (swagAnim in animList) + { + outputString += swagAnim + " " + char.animOffsets.get(swagAnim)[0] + " " + char.animOffsets.get(swagAnim)[1] + "\n"; + } + + outputString.trim(); + saveOffsets(outputString); + } + super.update(elapsed); } + + var _file:FileReference; + + private function saveOffsets(saveString:String) + { + if ((saveString != null) && (saveString.length > 0)) + { + _file = new FileReference(); + _file.addEventListener(Event.COMPLETE, onSaveComplete); + _file.addEventListener(Event.CANCEL, onSaveCancel); + _file.addEventListener(IOErrorEvent.IO_ERROR, onSaveError); + _file.save(saveString, daAnim + "Offsets.txt"); + } + } + + function onSaveComplete(_):Void + { + _file.removeEventListener(Event.COMPLETE, onSaveComplete); + _file.removeEventListener(Event.CANCEL, onSaveCancel); + _file.removeEventListener(IOErrorEvent.IO_ERROR, onSaveError); + _file = null; + FlxG.log.notice("Successfully saved LEVEL DATA."); + } + + /** + * Called when the save file dialog is cancelled. + */ + function onSaveCancel(_):Void + { + _file.removeEventListener(Event.COMPLETE, onSaveComplete); + _file.removeEventListener(Event.CANCEL, onSaveCancel); + _file.removeEventListener(IOErrorEvent.IO_ERROR, onSaveError); + _file = null; + } + + /** + * Called if there is an error while saving the gameplay recording. + */ + function onSaveError(_):Void + { + _file.removeEventListener(Event.COMPLETE, onSaveComplete); + _file.removeEventListener(Event.CANCEL, onSaveCancel); + _file.removeEventListener(IOErrorEvent.IO_ERROR, onSaveError); + _file = null; + FlxG.log.error("Problem saving Level data"); + } } diff --git a/source/Character.hx b/source/Character.hx index e8140a3a9..11ad2ac28 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -495,6 +495,31 @@ class Character extends FlxSprite addOffset("singDOWN-alt", -30, -27); playAnim('idle'); + case 'tankman': + frames = Paths.getSparrowAtlas('characters/tankmanCaptain'); + animation.addByPrefix('idle', "Tankman Idle Dance", 24, false); + animation.addByPrefix('singUP', 'Tankman UP note0', 24, false); + animation.addByPrefix('singDOWN', 'Tankman DOWN note0', 24, false); + animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false); + animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false); + animation.addByPrefix('singUPmiss', 'Tankman UP note MISS', 24, false); + animation.addByPrefix('singDOWNmiss', 'Tankman DOWN note MISS', 24, false); + animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false); + animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false); + + addOffset('idle'); + addOffset("singUP", 24, 56); + addOffset("singRIGHT", -1, -7); + addOffset("singLEFT", 100, -14); + addOffset("singDOWN", 98, -90); + addOffset("singUPmiss", 24, 56); + addOffset("singRIGHTmiss", -1, -7); + addOffset("singLEFTmiss", 100, -14); + addOffset("singDOWNmiss", 98, -90); + + playAnim('idle'); + + flipX = true; } dance(); @@ -522,6 +547,11 @@ class Character extends FlxSprite } } + private function loadOffsetFile(offsetCharacter:String) + { + var daFile:String = Paths.file("characters/" + offsetCharacter + "Offsets.txt"); + } + override function update(elapsed:Float) { if (!curCharacter.startsWith('bf')) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index d13f74d9b..d7b0c6fbe 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -75,6 +75,9 @@ class FreeplayState extends MusicBeatState if (StoryMenuState.weekUnlocked[6] || isDebug) addWeek(['Senpai', 'Roses', 'Thorns'], 6, ['senpai', 'senpai', 'spirit']); + if (StoryMenuState.weekUnlocked[7] || isDebug) + addWeek(['Ugh', 'Guns', 'Stress'], 7, ['tankman']); + // LOAD MUSIC // LOAD CHARACTERS From 0951b672e7cec22fed13e634e75947165d082890 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 4 Mar 2021 14:30:35 -0500 Subject: [PATCH 04/15] charts an shit and death counter --- source/Character.hx | 22 ++++++++++++--- source/PauseSubState.hx | 11 ++++++++ source/PlayState.hx | 61 ++++++++++++++++++++--------------------- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 11ad2ac28..7438d0c3e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -497,15 +497,29 @@ class Character extends FlxSprite playAnim('idle'); case 'tankman': frames = Paths.getSparrowAtlas('characters/tankmanCaptain'); + animation.addByPrefix('idle', "Tankman Idle Dance", 24, false); + + if (isPlayer) + { + animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false); + animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false); + animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false); + animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false); + } + else + { + // Need to be flipped! REDO THIS LATER + animation.addByPrefix('singLEFT', 'Tankman Right Note0', 24, false); + animation.addByPrefix('singRIGHT', 'Tankman Note Left0', 24, false); + animation.addByPrefix('singLEFTmiss', 'Tankman Right Note MISS', 24, false); + animation.addByPrefix('singRIGHTmiss', 'Tankman Note Left MISS', 24, false); + } + animation.addByPrefix('singUP', 'Tankman UP note0', 24, false); animation.addByPrefix('singDOWN', 'Tankman DOWN note0', 24, false); - animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false); - animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false); animation.addByPrefix('singUPmiss', 'Tankman UP note MISS', 24, false); animation.addByPrefix('singDOWNmiss', 'Tankman DOWN note MISS', 24, false); - animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false); - animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false); addOffset('idle'); addOffset("singUP", 24, 56); diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 2e36eda04..e5ccbed04 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -51,15 +51,25 @@ class PauseSubState extends MusicBeatSubstate levelDifficulty.updateHitbox(); add(levelDifficulty); + var deathCounter:FlxText = new FlxText(20, 15 + 64, 0, "", 32); + deathCounter.text = "Blue balled: " + PlayState.deathCounter; + deathCounter.scrollFactor.set(); + deathCounter.setFormat(Paths.font('vcr.ttf'), 32); + deathCounter.updateHitbox(); + add(deathCounter); + levelDifficulty.alpha = 0; levelInfo.alpha = 0; + deathCounter.alpha = 0; levelInfo.x = FlxG.width - (levelInfo.width + 20); levelDifficulty.x = FlxG.width - (levelDifficulty.width + 20); + deathCounter.x = FlxG.width - (deathCounter.width + 20); FlxTween.tween(bg, {alpha: 0.6}, 0.4, {ease: FlxEase.quartInOut}); FlxTween.tween(levelInfo, {alpha: 1, y: 20}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.3}); FlxTween.tween(levelDifficulty, {alpha: 1, y: levelDifficulty.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.5}); + FlxTween.tween(deathCounter, {alpha: 1, y: deathCounter.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.7}); grpMenuShit = new FlxTypedGroup(); add(grpMenuShit); @@ -108,6 +118,7 @@ class PauseSubState extends MusicBeatSubstate case "Restart Song": FlxG.resetState(); case "Exit to menu": + PlayState.deathCounter += 1; FlxG.switchState(new MainMenuState()); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index aabb992f5..7d8190477 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -49,6 +49,7 @@ class PlayState extends MusicBeatState public static var storyWeek:Int = 0; public static var storyPlaylist:Array = []; public static var storyDifficulty:Int = 1; + public static var deathCounter:Int = 0; var halloweenLevel:Bool = false; @@ -124,7 +125,6 @@ class PlayState extends MusicBeatState override public function create() { - if (FlxG.sound.music != null) FlxG.sound.music.stop(); @@ -573,6 +573,8 @@ class PlayState extends MusicBeatState dad.x -= 150; dad.y += 100; camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y); + case 'tankman': + dad.y += 180; } boyfriend = new Boyfriend(770, 450, SONG.player1); @@ -870,16 +872,8 @@ class PlayState extends MusicBeatState var introAssets:Map> = new Map>(); introAssets.set('default', ['ready', "set", "go"]); - introAssets.set('school', [ - 'weeb/pixelUI/ready-pixel', - 'weeb/pixelUI/set-pixel', - 'weeb/pixelUI/date-pixel' - ]); - introAssets.set('schoolEvil', [ - 'weeb/pixelUI/ready-pixel', - 'weeb/pixelUI/set-pixel', - 'weeb/pixelUI/date-pixel' - ]); + introAssets.set('school', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']); + introAssets.set('schoolEvil', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']); var introAlts:Array = introAssets.get('default'); var altSuffix:String = ""; @@ -1481,6 +1475,8 @@ class PlayState extends MusicBeatState vocals.stop(); FlxG.sound.music.stop(); + deathCounter += 1; + openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); // FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); @@ -1594,6 +1590,7 @@ class PlayState extends MusicBeatState function endSong():Void { + deathCounter = 0; canPause = false; FlxG.sound.music.volume = 0; vocals.volume = 0; @@ -1920,29 +1917,29 @@ class PlayState extends MusicBeatState */ // trace(daNote.noteData); /* - switch (daNote.noteData) + switch (daNote.noteData) + { + case 2: // NOTES YOU JUST PRESSED + if (upP || rightP || downP || leftP) + noteCheck(upP, daNote); + case 3: + if (upP || rightP || downP || leftP) + noteCheck(rightP, daNote); + case 1: + if (upP || rightP || downP || leftP) + noteCheck(downP, daNote); + case 0: + if (upP || rightP || downP || leftP) + noteCheck(leftP, daNote); + } + + //this is already done in noteCheck / goodNoteHit + if (daNote.wasGoodHit) { - case 2: // NOTES YOU JUST PRESSED - if (upP || rightP || downP || leftP) - noteCheck(upP, daNote); - case 3: - if (upP || rightP || downP || leftP) - noteCheck(rightP, daNote); - case 1: - if (upP || rightP || downP || leftP) - noteCheck(downP, daNote); - case 0: - if (upP || rightP || downP || leftP) - noteCheck(leftP, daNote); + daNote.kill(); + notes.remove(daNote, true); + daNote.destroy(); } - - //this is already done in noteCheck / goodNoteHit - if (daNote.wasGoodHit) - { - daNote.kill(); - notes.remove(daNote, true); - daNote.destroy(); - } */ } else From 956b5b94fddf456de3f3393d91774fda6e72a27d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 4 Mar 2021 19:36:56 -0500 Subject: [PATCH 05/15] video stuff in progress --- Project.xml | 3 +++ source/FreeplayState.hx | 19 +++++++------- source/Main.hx | 57 +++++++++++++++++++++++++++++++++++++++++ source/TitleState.hx | 8 +----- 4 files changed, 71 insertions(+), 16 deletions(-) diff --git a/Project.xml b/Project.xml index eca6f8b0a..221b1f43f 100644 --- a/Project.xml +++ b/Project.xml @@ -40,6 +40,8 @@ + + @@ -120,6 +122,7 @@ + diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index d7b0c6fbe..df6807160 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -43,13 +43,11 @@ class FreeplayState extends MusicBeatState songs.push(new SongMetadata(initSonglist[i], 1, 'gf')); } - /* - if (FlxG.sound.music != null) - { - if (!FlxG.sound.music.playing) - FlxG.sound.playMusic(Paths.music('freakyMenu')); - } - */ + if (FlxG.sound.music != null) + { + if (!FlxG.sound.music.playing) + FlxG.sound.playMusic(Paths.music('freakyMenu')); + } var isDebug:Bool = false; @@ -179,9 +177,12 @@ class FreeplayState extends MusicBeatState { super.update(elapsed); - if (FlxG.sound.music.volume < 0.7) + if (FlxG.sound.music != null) { - FlxG.sound.music.volume += 0.5 * FlxG.elapsed; + if (FlxG.sound.music.volume < 0.7) + { + FlxG.sound.music.volume += 0.5 * FlxG.elapsed; + } } lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.4)); diff --git a/source/Main.hx b/source/Main.hx index 7f287f87e..ee782ca64 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -6,7 +6,13 @@ import openfl.Assets; import openfl.Lib; import openfl.display.FPS; import openfl.display.Sprite; +import openfl.events.AsyncErrorEvent; import openfl.events.Event; +import openfl.events.MouseEvent; +import openfl.events.NetStatusEvent; +import openfl.media.Video; +import openfl.net.NetConnection; +import openfl.net.NetStream; class Main extends Sprite { @@ -49,6 +55,10 @@ class Main extends Sprite setupGame(); } + var video:Video; + var netStream:NetStream; + private var overlay:Sprite; + private function setupGame():Void { var stageWidth:Int = Lib.current.stage.stageWidth; @@ -72,5 +82,52 @@ class Main extends Sprite #if !mobile addChild(new FPS(10, 3, 0xFFFFFF)); #end + /* + video = new Video(); + addChild(video); + + var netConnection = new NetConnection(); + netConnection.connect(null); + + netStream = new NetStream(netConnection); + netStream.client = {onMetaData: client_onMetaData}; + netStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, netStream_onAsyncError); + + #if (js && html5) + overlay = new Sprite(); + overlay.graphics.beginFill(0, 0.5); + overlay.graphics.drawRect(0, 0, 560, 320); + overlay.addEventListener(MouseEvent.MOUSE_DOWN, overlay_onMouseDown); + overlay.buttonMode = true; + addChild(overlay); + + netConnection.addEventListener(NetStatusEvent.NET_STATUS, netConnection_onNetStatus); + #else + netStream.play("assets/preload/music/dredd.mp4"); + #end + */ } + /* + private function client_onMetaData(metaData:Dynamic) + { + video.attachNetStream(netStream); + + video.width = video.videoWidth; + video.height = video.videoHeight; + } + + private function netStream_onAsyncError(event:AsyncErrorEvent):Void + { + trace("Error loading video"); + } + + private function netConnection_onNetStatus(event:NetStatusEvent):Void + { + } + + private function overlay_onMouseDown(event:MouseEvent):Void + { + netStream.play("assets/preload/music/dredd.mp4"); + } + */ } diff --git a/source/TitleState.hx b/source/TitleState.hx index 3a3041678..572a97825 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -2,20 +2,14 @@ package; import flixel.FlxG; import flixel.FlxSprite; -import flixel.FlxState; -import flixel.addons.display.FlxGridOverlay; import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond; import flixel.addons.transition.FlxTransitionableState; import flixel.addons.transition.TransitionData; import flixel.graphics.FlxGraphic; -import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup; import flixel.input.gamepad.FlxGamepad; import flixel.math.FlxPoint; import flixel.math.FlxRect; -import flixel.system.FlxSound; -import flixel.system.ui.FlxSoundTray; -import flixel.text.FlxText; import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; import flixel.util.FlxColor; @@ -45,7 +39,7 @@ class TitleState extends MusicBeatState #if polymod polymod.Polymod.init({modRoot: "mods", dirs: ['introMod']}); #end - + PlayerSettings.init(); curWacky = FlxG.random.getObject(getIntroTextShit()); From db63d50100051ce2e33e8489801a03069aa48946 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 4 Mar 2021 19:37:22 -0500 Subject: [PATCH 06/15] took out openfl webm thing cuz it bullshit --- Project.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/Project.xml b/Project.xml index 221b1f43f..643401439 100644 --- a/Project.xml +++ b/Project.xml @@ -122,7 +122,6 @@ - From 7658fb245b22043b528e031cc95dfd8e86bac3d6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 7 Mar 2021 01:59:22 -0500 Subject: [PATCH 07/15] assets, and switch statement so i dont get roasted --- source/PlayState.hx | 467 +++++++++++++++++++++----------------------- 1 file changed, 225 insertions(+), 242 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 7d8190477..ffa3e1edb 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -174,272 +174,256 @@ class PlayState extends MusicBeatState dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); } - 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); + // FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]); + // overlayShit.shader = shaderBullshit; - // var shaderBullshit = new BlendModeEffect(new OverlayShader(), FlxColor.RED); + limo = new FlxSprite(-120, 550); + limo.frames = Paths.getSparrowAtlas('limo/limoDrive'); + limo.animation.addByPrefix('drive', "Limo stage", 24); + limo.animation.play('drive'); + limo.antialiasing = true; - // FlxG.camera.setFilters([new ShaderFilter(cast shaderBullshit.shader)]); - - // overlayShit.shader = shaderBullshit; - - 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; - - fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol')); + fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol')); // add(limo); - } - else if (SONG.song.toLowerCase() == 'cocoa' || SONG.song.toLowerCase() == 'eggnog') - { - curStage = 'mall'; + 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')); @@ -484,33 +468,32 @@ class PlayState extends MusicBeatState 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); - 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); + 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 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 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); - add(stageCurtains); + 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); } var gfVersion:String = 'gf'; From 4fae6773c97fee3a73ce305f61680e124c8ce181 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 7 Mar 2021 15:34:21 -0500 Subject: [PATCH 08/15] tank guy and quality of life shit --- CHANGELOG.md | 7 +++++++ source/BGSprite.hx | 19 +++++++++++++++++++ source/FreeplayState.hx | 3 --- source/PauseSubState.hx | 39 +++++++++++++++++++++++++++++++++++---- source/PlayState.hx | 33 ++++++++++++++++++++++++++++----- 5 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 source/BGSprite.hx diff --git a/CHANGELOG.md b/CHANGELOG.md index cc5d7fa84..5efcd3d6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- TANKMAN! 3 NEW SONGS BY KAWAISPRITE (UGH, GUNS, STRESS)! Charting help by MtH! +- Monster added into week 2, FINALLY (Charting help by MtH and ChaoticGamer!) +- Can now change song difficulty mid-game. +- Shows some song info on pause screen. +- Cute little icons onto freeplay menu ### Changed - ASSET LOADING OVERHAUL, WAY FASTER LOAD TIMES ON WEB!!! (THANKS TO GEOKURELI WOKE KING) +- Made difficulty selector on freeplay menu more apparent ### Fixed - That one random note on Bopeebo diff --git a/source/BGSprite.hx b/source/BGSprite.hx new file mode 100644 index 000000000..6af1fadd6 --- /dev/null +++ b/source/BGSprite.hx @@ -0,0 +1,19 @@ +package; + +import flixel.FlxSprite; + +class BGSprite extends FlxSprite +{ + /** + Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit + */ + public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1) + { + super(x, y); + + loadGraphic(Paths.image(image)); + scrollFactor.set(parX, parY); + antialiasing = true; + active = false; + } +} diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index df6807160..2e3d98c50 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -219,9 +219,6 @@ class FreeplayState extends MusicBeatState if (accepted) { var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty); - - trace(poop); - PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase()); PlayState.isStoryMode = false; PlayState.storyDifficulty = curDifficulty; diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index e5ccbed04..c340d8ed2 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -17,7 +17,10 @@ class PauseSubState extends MusicBeatSubstate { var grpMenuShit:FlxTypedGroup; - var menuItems:Array = ['Resume', 'Restart Song', 'Exit to menu']; + var pauseOG:Array = ['Resume', 'Restart Song', 'Change Difficulty', 'Exit to menu']; + var difficultyChoices:Array = ['EASY', 'NORMAL', 'HARD', 'BACK']; + + var menuItems:Array = []; var curSelected:Int = 0; var pauseMusic:FlxSound; @@ -26,6 +29,8 @@ class PauseSubState extends MusicBeatSubstate { super(); + menuItems = pauseOG; + pauseMusic = new FlxSound().loadEmbedded(Paths.music('breakfast'), true, true); pauseMusic.volume = 0; pauseMusic.play(false, FlxG.random.int(0, Std.int(pauseMusic.length / 2))); @@ -74,6 +79,19 @@ class PauseSubState extends MusicBeatSubstate grpMenuShit = new FlxTypedGroup(); add(grpMenuShit); + regenMenu(); + + cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; + } + + private function regenMenu():Void + { + grpMenuShit.forEachAlive(function(thing:Alphabet) + { + grpMenuShit.remove(thing); + thing.destroy(); + }); + for (i in 0...menuItems.length) { var songText:Alphabet = new Alphabet(0, (70 * i) + 30, menuItems[i], true, false); @@ -82,9 +100,8 @@ class PauseSubState extends MusicBeatSubstate grpMenuShit.add(songText); } + curSelected = 0; changeSelection(); - - cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]]; } override function update(elapsed:Float) @@ -115,10 +132,24 @@ class PauseSubState extends MusicBeatSubstate { case "Resume": close(); + case "EASY" | 'NORMAL' | "HARD": + PlayState.SONG = Song.loadFromJson(Highscore.formatSong(PlayState.SONG.song.toLowerCase(), curSelected), + PlayState.SONG.song.toLowerCase()); + + PlayState.storyDifficulty = curSelected; + + FlxG.resetState(); + + case 'Change Difficulty': + menuItems = difficultyChoices; + regenMenu(); + case 'BACK': + menuItems = pauseOG; + regenMenu(); case "Restart Song": FlxG.resetState(); case "Exit to menu": - PlayState.deathCounter += 1; + PlayState.deathCounter = 0; FlxG.switchState(new MainMenuState()); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index ffa3e1edb..9f17da0c0 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -174,7 +174,7 @@ class PlayState extends MusicBeatState dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); } - switch (Song.song.toLowerCase()) + switch (SONG.song.toLowerCase()) { case 'spookeez' | 'monster' | 'south': curStage = "spooky"; @@ -469,13 +469,36 @@ class PlayState extends MusicBeatState add(waveSpriteFG); */ + case 'guns' | 'stress' | 'ugh': + // defaultCamZoom = 0.9; + curStage = 'tank'; + + var bg:BGSprite = new BGSprite('tankSky', 0, -200, 0, 0); + add(bg); + + var tankSky:BGSprite = new BGSprite('tankClouds', 0, 10, 0.1, 0.1); + add(tankSky); + + var tankMountains:BGSprite = new BGSprite('tankMountains', -100, 150, 0.2, 0.2); + add(tankMountains); + + var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 370, 0.25, 0.25); + add(tankBuildings); + + var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 170, 0.35, 0.35); + add(tankRuins); + + var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 300, 50, 0.5, 0.5); + add(tankWatchtower); + + var tankGround:BGSprite = new BGSprite('tankGround', -400, -20); + add(tankGround); + 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; + + var bg:BGSprite = new BGSprite('stageback', -600, -200, 0.9, 0.9); add(bg); var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront')); From d7aba46853592f71788ac6305f39c45f11a0d0fc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 8 Mar 2021 18:38:58 -0500 Subject: [PATCH 09/15] tankmen foreground in progress --- source/BGSprite.hx | 30 +++++++++++++++++++++++++++--- source/PauseSubState.hx | 29 ++++++++++++++++++++++++----- source/PlayState.hx | 37 ++++++++++++++++++++++++++++++++++--- 3 files changed, 85 insertions(+), 11 deletions(-) diff --git a/source/BGSprite.hx b/source/BGSprite.hx index 6af1fadd6..a1013b015 100644 --- a/source/BGSprite.hx +++ b/source/BGSprite.hx @@ -7,13 +7,37 @@ class BGSprite extends FlxSprite /** Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit */ - public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1) + public var idleAnim:String; + + public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1, ?daAnimations:Array) { super(x, y); - loadGraphic(Paths.image(image)); + if (daAnimations != null) + { + frames = Paths.getSparrowAtlas(image); + for (anims in daAnimations) + { + animation.addByPrefix(anims, anims, 24, false); + animation.play(anims); + + if (idleAnim == null) + idleAnim = anims; + } + } + else + { + loadGraphic(Paths.image(image)); + active = false; + } + scrollFactor.set(parX, parY); antialiasing = true; - active = false; + } + + public function dance():Void + { + if (idleAnim != null) + animation.play(idleAnim); } } diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index c340d8ed2..f0215ee10 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -17,7 +17,13 @@ class PauseSubState extends MusicBeatSubstate { var grpMenuShit:FlxTypedGroup; - var pauseOG:Array = ['Resume', 'Restart Song', 'Change Difficulty', 'Exit to menu']; + var pauseOG:Array = [ + 'Resume', + 'Restart Song', + 'Change Difficulty', + 'Toggle Practice Mode', + 'Exit to menu' + ]; var difficultyChoices:Array = ['EASY', 'NORMAL', 'HARD', 'BACK']; var menuItems:Array = []; @@ -25,6 +31,8 @@ class PauseSubState extends MusicBeatSubstate var pauseMusic:FlxSound; + var practiceText:FlxText; + public function new(x:Float, y:Float) { super(); @@ -63,6 +71,14 @@ class PauseSubState extends MusicBeatSubstate deathCounter.updateHitbox(); add(deathCounter); + practiceText = new FlxText(20, 15 + 64 + 32, 0, "PRACTICE MODE", 32); + practiceText.scrollFactor.set(); + practiceText.setFormat(Paths.font('vcr.ttf'), 32); + practiceText.updateHitbox(); + practiceText.x = FlxG.width - (practiceText.width + 20); + practiceText.visible = PlayState.practiceMode; + add(practiceText); + levelDifficulty.alpha = 0; levelInfo.alpha = 0; deathCounter.alpha = 0; @@ -86,11 +102,10 @@ class PauseSubState extends MusicBeatSubstate private function regenMenu():Void { - grpMenuShit.forEachAlive(function(thing:Alphabet) + while (grpMenuShit.members.length > 0) { - grpMenuShit.remove(thing); - thing.destroy(); - }); + grpMenuShit.remove(grpMenuShit.members[0], true); + } for (i in 0...menuItems.length) { @@ -140,6 +155,10 @@ class PauseSubState extends MusicBeatSubstate FlxG.resetState(); + case 'Toggle Practice Mode': + PlayState.practiceMode = !PlayState.practiceMode; + practiceText.visible = PlayState.practiceMode; + case 'Change Difficulty': menuItems = difficultyChoices; regenMenu(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 9f17da0c0..c864df782 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -50,6 +50,7 @@ class PlayState extends MusicBeatState public static var storyPlaylist:Array = []; public static var storyDifficulty:Int = 1; public static var deathCounter:Int = 0; + public static var practiceMode:Bool = false; var halloweenLevel:Bool = false; @@ -99,6 +100,8 @@ class PlayState extends MusicBeatState var phillyTrain:FlxSprite; var trainSound:FlxSound; + var foregroundSprites:FlxTypedGroup; + var limo:FlxSprite; var grpLimoDancers:FlxTypedGroup; var fastCar:FlxSprite; @@ -147,6 +150,8 @@ class PlayState extends MusicBeatState Conductor.mapBPMChanges(SONG); Conductor.changeBPM(SONG.bpm); + foregroundSprites = new FlxTypedGroup(); + switch (SONG.song.toLowerCase()) { case 'tutorial': @@ -470,7 +475,7 @@ class PlayState extends MusicBeatState */ case 'guns' | 'stress' | 'ugh': - // defaultCamZoom = 0.9; + // defaultCamZoom = 0.95; curStage = 'tank'; var bg:BGSprite = new BGSprite('tankSky', 0, -200, 0, 0); @@ -491,9 +496,28 @@ class PlayState extends MusicBeatState var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 300, 50, 0.5, 0.5); add(tankWatchtower); - var tankGround:BGSprite = new BGSprite('tankGround', -400, -20); + var tankGround:BGSprite = new BGSprite('tankGround', -200, -20); add(tankGround); + var fgTank0:BGSprite = new BGSprite('tank0', -290, 400, 1.7, 1.5, ['fg']); + foregroundSprites.add(fgTank0); + + var fgTank1:BGSprite = new BGSprite('tank1', -100, 680, 2, 0.2, ['fg']); + foregroundSprites.add(fgTank1); + + // just called 'foreground' just cuz small inconsistency no bbiggei + var fgTank2:BGSprite = new BGSprite('tank2', 450, 840, 1.5, 1.5, ['foreground']); + foregroundSprites.add(fgTank2); + + var fgTank4:BGSprite = new BGSprite('tank4', 1000, 880, 1.5, 1.5, ['fg']); + foregroundSprites.add(fgTank4); + + var fgTank5:BGSprite = new BGSprite('tank5', 1400, 600, 1.5, 1.5, ['fg']); + foregroundSprites.add(fgTank5); + + var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1130, 3.5, 2.5, ['fg']); + foregroundSprites.add(fgTank3); + default: defaultCamZoom = 0.9; curStage = 'stage'; @@ -630,6 +654,8 @@ class PlayState extends MusicBeatState add(dad); add(boyfriend); + add(foregroundSprites); + var doof:DialogueBox = new DialogueBox(false, dialogue); // doof.x += 70; // doof.y = FlxG.height * 0.5; @@ -1470,7 +1496,7 @@ class PlayState extends MusicBeatState trace("User is cheating!"); } - if (health <= 0) + if (health <= 0 && !practiceMode) { boyfriend.stunned = true; @@ -2310,6 +2336,11 @@ class PlayState extends MusicBeatState } } + foregroundSprites.forEach(function(spr:BGSprite) + { + spr.dance(); + }); + switch (curStage) { case 'school': From d3c17bc42a08f22f16a2de2a6a377425d70e5955 Mon Sep 17 00:00:00 2001 From: MtH Date: Tue, 9 Mar 2021 12:29:00 +0100 Subject: [PATCH 10/15] gf sad offset TINY FIX --- source/Character.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Character.hx b/source/Character.hx index 7438d0c3e..6fd919e2b 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -47,7 +47,7 @@ class Character extends FlxSprite animation.addByPrefix('scared', 'GF FEAR', 24); addOffset('cheer'); - addOffset('sad', -2, -2); + addOffset('sad', -2, -21); addOffset('danceLeft', 0, -9); addOffset('danceRight', 0, -9); @@ -78,7 +78,7 @@ class Character extends FlxSprite animation.addByPrefix('scared', 'GF FEAR', 24); addOffset('cheer'); - addOffset('sad', -2, -2); + addOffset('sad', -2, -21); addOffset('danceLeft', 0, -9); addOffset('danceRight', 0, -9); From bfcb037b8110700daf3ad31df2614d544a2248d3 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 9 Mar 2021 19:41:03 -0500 Subject: [PATCH 11/15] file and folder detection --- source/LoadingState.hx | 140 ++++++++++++++++++++------------------ source/ModdingSubstate.hx | 33 +++++++++ source/OptionsSubState.hx | 7 ++ 3 files changed, 112 insertions(+), 68 deletions(-) create mode 100644 source/ModdingSubstate.hx diff --git a/source/LoadingState.hx b/source/LoadingState.hx index 23bce2e68..52a883b77 100644 --- a/source/LoadingState.hx +++ b/source/LoadingState.hx @@ -1,39 +1,37 @@ package; -import lime.app.Promise; -import lime.app.Future; import flixel.FlxG; -import flixel.FlxState; import flixel.FlxSprite; +import flixel.FlxState; import flixel.graphics.frames.FlxAtlasFrames; import flixel.util.FlxTimer; - -import openfl.utils.Assets; -import lime.utils.Assets as LimeAssets; +import haxe.io.Path; +import lime.app.Future; +import lime.app.Promise; import lime.utils.AssetLibrary; import lime.utils.AssetManifest; - -import haxe.io.Path; +import lime.utils.Assets as LimeAssets; +import openfl.utils.Assets; class LoadingState extends MusicBeatState { inline static var MIN_TIME = 1.0; - + var target:FlxState; var stopMusic = false; var callbacks:MultiCallback; - + var logo:FlxSprite; var gfDance:FlxSprite; var danceLeft = false; - + function new(target:FlxState, stopMusic:Bool) { super(); this.target = target; this.stopMusic = stopMusic; } - + override function create() { logo = new FlxSprite(-150, -100); @@ -52,29 +50,26 @@ class LoadingState extends MusicBeatState gfDance.antialiasing = true; add(gfDance); add(logo); - - initSongsManifest().onComplete - ( - function (lib) - { - callbacks = new MultiCallback(onLoad); - var introComplete = callbacks.add("introComplete"); - checkLoadSong(getSongPath()); - if (PlayState.SONG.needsVoices) - checkLoadSong(getVocalPath()); - checkLibrary("shared"); - if (PlayState.storyWeek > 0) - checkLibrary("week" + PlayState.storyWeek); - else - checkLibrary("tutorial"); - - var fadeTime = 0.5; - FlxG.camera.fade(FlxG.camera.bgColor, fadeTime, true); - new FlxTimer().start(fadeTime + MIN_TIME, function(_) introComplete()); - } - ); + + initSongsManifest().onComplete(function(lib) + { + callbacks = new MultiCallback(onLoad); + var introComplete = callbacks.add("introComplete"); + checkLoadSong(getSongPath()); + if (PlayState.SONG.needsVoices) + checkLoadSong(getVocalPath()); + checkLibrary("shared"); + if (PlayState.storyWeek > 0) + checkLibrary("week" + PlayState.storyWeek); + else + checkLibrary("tutorial"); + + var fadeTime = 0.5; + FlxG.camera.fade(FlxG.camera.bgColor, fadeTime, true); + new FlxTimer().start(fadeTime + MIN_TIME, function(_) introComplete()); + }); } - + function checkLoadSong(path:String) { if (!Assets.cache.hasSound(path)) @@ -86,10 +81,13 @@ class LoadingState extends MusicBeatState // @:privateAccess // library.pathGroups.set(symbolPath, [library.__cacheBreak(symbolPath)]); var callback = callbacks.add("song:" + path); - Assets.loadSound(path).onComplete(function (_) { callback(); }); + Assets.loadSound(path).onComplete(function(_) + { + callback(); + }); } } - + function checkLibrary(library:String) { trace(Assets.hasLibrary(library)); @@ -98,25 +96,28 @@ class LoadingState extends MusicBeatState @:privateAccess if (!LimeAssets.libraryPaths.exists(library)) throw "Missing library: " + library; - + var callback = callbacks.add("library:" + library); - Assets.loadLibrary(library).onComplete(function (_) { callback(); }); + Assets.loadLibrary(library).onComplete(function(_) + { + callback(); + }); } } - + override function beatHit() { super.beatHit(); - + logo.animation.play('bump'); danceLeft = !danceLeft; - + if (danceLeft) gfDance.animation.play('danceRight'); else gfDance.animation.play('danceLeft'); } - + override function update(elapsed:Float) { super.update(elapsed); @@ -125,30 +126,30 @@ class LoadingState extends MusicBeatState trace('fired: ' + callbacks.getFired() + " unfired:" + callbacks.getUnfired()); #end } - + function onLoad() { if (stopMusic && FlxG.sound.music != null) FlxG.sound.music.stop(); - + FlxG.switchState(target); } - + static function getSongPath() { return Paths.inst(PlayState.SONG.song); } - + static function getVocalPath() { return Paths.voices(PlayState.SONG.song); } - + inline static public function loadAndSwitchState(target:FlxState, stopMusic = false) { FlxG.switchState(getNextState(target, stopMusic)); } - + static function getNextState(target:FlxState, stopMusic = false):FlxState { Paths.setCurrentLevel("week" + PlayState.storyWeek); @@ -156,35 +157,35 @@ class LoadingState extends MusicBeatState var loaded = isSoundLoaded(getSongPath()) && (!PlayState.SONG.needsVoices || isSoundLoaded(getVocalPath())) && isLibraryLoaded("shared"); - + if (!loaded) return new LoadingState(target, stopMusic); #end if (stopMusic && FlxG.sound.music != null) FlxG.sound.music.stop(); - + return target; } - + #if NO_PRELOAD_ALL static function isSoundLoaded(path:String):Bool { return Assets.cache.hasSound(path); } - + static function isLibraryLoaded(library:String):Bool { return Assets.getLibrary(library) != null; } #end - + override function destroy() { super.destroy(); - + callbacks = null; } - + static function initSongsManifest() { var id = "songs"; @@ -245,7 +246,7 @@ class LoadingState extends MusicBeatState } }).onError(function(_) { - promise.error("There is no asset library with an ID of \"" + id + "\""); + promise.error("There is no asset library with an ID of \"" + id + "\""); }); return promise.future; @@ -258,33 +259,33 @@ class MultiCallback public var logId:String = null; public var length(default, null) = 0; public var numRemaining(default, null) = 0; - + var unfired = new MapVoid>(); var fired = new Array(); - - public function new (callback:Void->Void, logId:String = null) + + public function new(callback:Void->Void, logId:String = null) { this.callback = callback; this.logId = logId; } - + public function add(id = "untitled") { id = '$length:$id'; length++; numRemaining++; var func:Void->Void = null; - func = function () + func = function() { if (unfired.exists(id)) { unfired.remove(id); fired.push(id); numRemaining--; - + if (logId != null) log('fired $id, $numRemaining remaining'); - + if (numRemaining == 0) { if (logId != null) @@ -298,13 +299,16 @@ class MultiCallback unfired[id] = func; return func; } - + inline function log(msg):Void { if (logId != null) trace('$logId: $msg'); } - - public function getFired() return fired.copy(); - public function getUnfired() return [for (id in unfired.keys()) id]; -} \ No newline at end of file + + public function getFired() + return fired.copy(); + + public function getUnfired() + return [for (id in unfired.keys()) id]; +} diff --git a/source/ModdingSubstate.hx b/source/ModdingSubstate.hx new file mode 100644 index 000000000..81f5a358f --- /dev/null +++ b/source/ModdingSubstate.hx @@ -0,0 +1,33 @@ +package; + +import flixel.text.FlxText; +import sys.FileSystem; + +class ModdingSubstate extends MusicBeatSubstate +{ + public function new():Void + { + super(); + + // var pathShit + + var modList = []; + + for (file in FileSystem.readDirectory('./mods')) + { + if (FileSystem.isDirectory("./mods/" + file)) + modList.push(file); + } + + trace(modList); + + var loopNum:Int = 0; + for (i in modList) + { + var txt:FlxText = new FlxText(0, 10 + (40 * loopNum), 0, i, 32); + add(txt); + + loopNum++; + } + } +} diff --git a/source/OptionsSubState.hx b/source/OptionsSubState.hx index 2b63e0c2f..67b129c67 100644 --- a/source/OptionsSubState.hx +++ b/source/OptionsSubState.hx @@ -19,6 +19,10 @@ class OptionsSubState extends MusicBeatSubstate { super(); + #if desktop + textMenuItems.push('Mods'); + #end + grpOptionsTexts = new FlxTypedGroup(); add(grpOptionsTexts); @@ -64,6 +68,9 @@ class OptionsSubState extends MusicBeatSubstate case "Controls": FlxG.state.closeSubState(); FlxG.state.openSubState(new ControlsSubState()); + case "Mods": + FlxG.state.closeSubState(); + FlxG.state.openSubState(new ModdingSubstate()); } } } From bfd6325c43053d0de6a03bbc2f388488ef9bbe92 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 10 Mar 2021 00:27:57 -0500 Subject: [PATCH 12/15] mod menu prototyping --- Project.xml | 5 +- .../assets/preload/data/introText.txt | 1 + .../assets/preload/images/gfDanceTitle.png | Bin 0 -> 2432057 bytes source/ModdingSubstate.hx | 125 +++++++++++++++++- source/TitleState.hx | 13 +- 5 files changed, 136 insertions(+), 8 deletions(-) create mode 100644 example_mods/introMod/assets/preload/data/introText.txt create mode 100644 example_mods/introMod/assets/preload/images/gfDanceTitle.png diff --git a/Project.xml b/Project.xml index 643401439..029d6c890 100644 --- a/Project.xml +++ b/Project.xml @@ -96,7 +96,10 @@ - + + +