diff --git a/source/PlayState.hx b/source/PlayState.hx index a4c793c04..36cd9fe7e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -77,7 +77,6 @@ class PlayState extends MusicBeatState private var unspawnNotes:Array = []; private var strumLine:FlxSprite; - private var curSection:Int = 0; private var camFollow:FlxObject; @@ -2089,11 +2088,21 @@ class PlayState extends MusicBeatState #if debug if (FlxG.keys.justPressed.EIGHT) { + /* 8 for opponent char + SHIFT+8 for player char + CTRL+SHIFT+8 for gf */ if (FlxG.keys.pressed.SHIFT) - FlxG.switchState(new AnimationDebug(SONG.player1)); + if (FlxG.keys.pressed.CONTROL) + FlxG.switchState(new AnimationDebug(gf.curCharacter)); + else + FlxG.switchState(new AnimationDebug(SONG.player1)); else FlxG.switchState(new AnimationDebug(SONG.player2)); } + if (FlxG.keys.justPressed.PAGEUP) + changeSection(1); + if (FlxG.keys.justPressed.PAGEDOWN) + changeSection(-1); #end if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null) @@ -2351,6 +2360,27 @@ class PlayState extends MusicBeatState } } + #if debug + function changeSection(sec:Int):Void + { + FlxG.sound.music.pause(); + + var daBPM:Float = SONG.bpm; + var daPos:Float = 0; + for (i in 0...(Std.int(curStep / 16 + sec))) + { + if (SONG.notes[i].changeBPM) + { + daBPM = SONG.notes[i].bpm; + } + daPos += 4 * (1000 * 60 / daBPM); + } + Conductor.songPosition = FlxG.sound.music.time = daPos; + updateCurStep(); + resyncVocals(); + } + #end + function endSong():Void { seenCutscene = false;