i love breaking limits

This commit is contained in:
Yoshman29
2023-03-25 15:55:20 +01:00
parent 5450da2274
commit 836089c0e4
2 changed files with 16 additions and 10 deletions
+15 -10
View File
@@ -624,6 +624,7 @@ class PlayState extends MusicBeatState
} else {
FlxG.camera.focusOn(camFollow.getPosition());
}
smoothTransitionData = null;
FlxG.worldBounds.set(0, 0, FlxG.width, FlxG.height);
@@ -1246,16 +1247,7 @@ class PlayState extends MusicBeatState
trace('LOADING NEXT SONG');
trace(PlayState.storyPlaylist[0].toLowerCase(), difficulty);
smoothTransitionData = {
stage: curStage,
camX: FlxG.camera.scroll.x,
camY: FlxG.camera.scroll.y,
camFollowX: camFollow.x,
camFollowY: camFollow.y,
camZoom: FlxG.camera.zoom
};
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
registerSmoothTransition();
FlxG.sound.music.stop();
@@ -1271,6 +1263,19 @@ class PlayState extends MusicBeatState
}
}
public function registerSmoothTransition() {
smoothTransitionData = {
stage: curStage,
camX: FlxG.camera.scroll.x,
camY: FlxG.camera.scroll.y,
camFollowX: camFollow.x,
camFollowY: camFollow.y,
camZoom: FlxG.camera.zoom
};
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
}
var __funcsToExec:Array<Note->Void> = [];
var __pressed:Array<Bool> = [];
var __justPressed:Array<Bool> = [];
+1
View File
@@ -137,6 +137,7 @@ class PauseSubState extends MusicBeatSubstate
case "Resume":
close();
case "Restart Song":
PlayState.instance.registerSmoothTransition();
FlxG.resetState();
case "Change Controls":
persistentDraw = false;