diff --git a/source/funkin/play/Countdown.hx b/source/funkin/play/Countdown.hx index a8bf1b500..47d6faa9c 100644 --- a/source/funkin/play/Countdown.hx +++ b/source/funkin/play/Countdown.hx @@ -71,8 +71,6 @@ class Countdown // @:privateAccess // PlayState.instance.dispatchEvent(new SongTimeScriptEvent(SONG_BEAT_HIT, 0, 0)); - fetchNoteStyle(); - // The timer function gets called based on the beat of the song. countdownTimer = new FlxTimer(); @@ -90,10 +88,10 @@ class Countdown // PlayState.instance.dispatchEvent(new SongTimeScriptEvent(SONG_BEAT_HIT, 0, 0)); // Countdown graphic. - showCountdownGraphic(countdownStep, noteStyle); + showCountdownGraphic(countdownStep); // Countdown sound. - playCountdownSound(countdownStep, noteStyle); + playCountdownSound(countdownStep); // Event handling bullshit. var cancelled:Bool = propagateCountdownEvent(countdownStep); @@ -223,7 +221,7 @@ class Countdown /** * Retrieves the graphic to use for this step of the countdown. */ - public static function showCountdownGraphic(index:CountdownStep, noteStyle:NoteStyle):Void + public static function showCountdownGraphic(index:CountdownStep):Void { var indexString:String = null; switch (index) @@ -240,7 +238,7 @@ class Countdown if (indexString == null) return; var spritePath:String = null; - spritePath = resolveGraphicPath(noteStyle, indexString); + spritePath = resolveGraphicPath(indexString); if (spritePath == null) return; @@ -259,26 +257,21 @@ class Countdown countdownSprite.cameras = [PlayState.instance.camHUD]; countdownSprite.updateHitbox(); - countdownSprite.screenCenter(); // Fade sprite in, then out, then destroy it. - FlxTween.tween(countdownSprite, {y: countdownSprite.y += 100}, Conductor.instance.beatLengthMs / 1000, + FlxTween.tween(countdownSprite, {alpha: 0}, Conductor.instance.beatLengthMs / 1000, { - ease: FlxEase.cubeInOut, + ease: fadeEase, onComplete: function(twn:FlxTween) { countdownSprite.destroy(); } }); - FlxTween.tween(countdownSprite, {alpha: 0}, Conductor.instance.beatLengthMs / 1000, - { - ease: fadeEase - }); - PlayState.instance.add(countdownSprite); + countdownSprite.screenCenter(); } - static function resolveGraphicPath(noteStyle:NoteStyle, index:String):Null + static function resolveGraphicPath(index:String):Null { fetchNoteStyle(); var basePath:String = 'ui/countdown/'; @@ -307,12 +300,12 @@ class Countdown /** * Retrieves the sound file to use for this step of the countdown. */ - public static function playCountdownSound(step:CountdownStep, noteStyle:NoteStyle):Void + public static function playCountdownSound(step:CountdownStep):Void { - return FunkinSound.playOnce(Paths.sound(resolveSoundPath(noteStyle, step)), Constants.COUNTDOWN_VOLUME); + return FunkinSound.playOnce(Paths.sound(resolveSoundPath(step)), Constants.COUNTDOWN_VOLUME); } - static function resolveSoundPath(noteStyle:NoteStyle, step:CountdownStep):Null + static function resolveSoundPath(step:CountdownStep):Null { if (step == CountdownStep.BEFORE || step == CountdownStep.AFTER) return null; fetchNoteStyle(); diff --git a/source/funkin/play/components/PopUpStuff.hx b/source/funkin/play/components/PopUpStuff.hx index 97e1d291d..b9479ec8b 100644 --- a/source/funkin/play/components/PopUpStuff.hx +++ b/source/funkin/play/components/PopUpStuff.hx @@ -30,8 +30,6 @@ class PopUpStuff extends FlxTypedGroup override public function new() { super(); - - fetchNoteStyle(); } static function fetchNoteStyle():Void @@ -44,7 +42,7 @@ class PopUpStuff extends FlxTypedGroup isPixel = false; } - static function resolveGraphicPath(noteStyle:NoteStyle, index:String):Null + static function resolveGraphicPath(index:String):Null { fetchNoteStyle(); var basePath:String = 'ui/popup/'; @@ -75,7 +73,7 @@ class PopUpStuff extends FlxTypedGroup if (daRating == null) daRating = "good"; - var ratingPath:String = resolveGraphicPath(noteStyle, daRating); + var ratingPath:String = resolveGraphicPath(daRating); // if (PlayState.instance.currentStageId.startsWith('school')) ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel"; @@ -131,7 +129,7 @@ class PopUpStuff extends FlxTypedGroup if (combo == null) combo = 0; - var comboPath:String = resolveGraphicPath(noteStyle, 'combo'); + var comboPath:String = resolveGraphicPath('combo'); var comboSpr:FunkinSprite = FunkinSprite.create(comboPath); comboSpr.y = (FlxG.camera.height * 0.44) + offsets[1]; comboSpr.x = (FlxG.width * 0.507) + offsets[0]; @@ -186,7 +184,7 @@ class PopUpStuff extends FlxTypedGroup var daLoop:Int = 1; for (i in seperatedScore) { - var numScore:FunkinSprite = FunkinSprite.create(0, comboSpr.y, resolveGraphicPath(noteStyle, 'num' + Std.int(i))); + var numScore:FunkinSprite = FunkinSprite.create(0, comboSpr.y, resolveGraphicPath('num' + Std.int(i))); if (graphicSuffix.toLowerCase().contains('pixel')) {