From 23c7cc41e4950b82750fe88613ea210380133c3f Mon Sep 17 00:00:00 2001 From: /nick haya <74699483+The-SGPT@users.noreply.github.com> Date: Tue, 21 Sep 2021 11:11:21 +0800 Subject: [PATCH] fix transitions --- source/gameFolder/meta/state/PlayState.hx | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/source/gameFolder/meta/state/PlayState.hx b/source/gameFolder/meta/state/PlayState.hx index fa24d8b12..73ec4c769 100644 --- a/source/gameFolder/meta/state/PlayState.hx +++ b/source/gameFolder/meta/state/PlayState.hx @@ -104,6 +104,7 @@ class PlayState extends MusicBeatState var lastReportedPlayheadPosition:Int = 0; var songTime:Float = 0; + public static var uiRCam:FlxCamera; public static var camHUD:FlxCamera; public static var camGame:FlxCamera; @@ -317,6 +318,11 @@ class PlayState extends MusicBeatState } add(strumLines); + // create the TRUE receptor camera + uiRCam = new FlxCamera(); + uiRCam.bgColor.alpha = 0; + FlxG.cameras.add(uiRCam); + // set strumHUD cams to separate positions if not centered notefields if (!Init.trueSettings.get('Centered Notefield')) { @@ -325,6 +331,12 @@ class PlayState extends MusicBeatState strumHUD[1].x += truePlacement; } + // sets the receptor cameras to a separate camera + for (i in 0...strumLines.length) + { + strumHUD[i].cameras = [uiRCam]; + } + uiHUD = new ClassHUD(); add(uiHUD); uiHUD.cameras = [camHUD]; @@ -1318,11 +1330,6 @@ class PlayState extends MusicBeatState // trace('ui shit break'); if ((startTimer != null) && (!startTimer.finished)) startTimer.active = false; - - for (i in 0...strumHUD.length) - { - strumHUD[i].filtersEnabled = false; - } } // trace('open substate'); @@ -1344,11 +1351,6 @@ class PlayState extends MusicBeatState ///* updateRPC(false); // */ - - for (i in 0...strumHUD.length) - { - strumHUD[i].filtersEnabled = true; - } } super.closeSubState(); @@ -1415,6 +1417,7 @@ class PlayState extends MusicBeatState blackShit.scrollFactor.set(); add(blackShit); camHUD.visible = false; + uiRCam.visible = false; // oooo spooky FlxG.sound.play(Paths.sound('Lights_Shut_off')); @@ -1454,6 +1457,7 @@ class PlayState extends MusicBeatState add(blackScreen); blackScreen.scrollFactor.set(); camHUD.visible = false; + uiRCam.visible = false; new FlxTimer().start(0.1, function(tmr:FlxTimer) { @@ -1467,6 +1471,7 @@ class PlayState extends MusicBeatState new FlxTimer().start(0.8, function(tmr:FlxTimer) { camHUD.visible = true; + uiRCam.visible = true; remove(blackScreen); FlxTween.tween(FlxG.camera, {zoom: defaultCamZoom}, 2.5, { ease: FlxEase.quadInOut,