1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-28 15:57:42 +00:00

wocky slush

debug shit, gf in animdebug, changesection
This commit is contained in:
MtH 2021-04-21 15:07:36 +02:00
parent b88ad022f2
commit adb41ce289

View file

@ -77,7 +77,6 @@ class PlayState extends MusicBeatState
private var unspawnNotes:Array<Note> = [];
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;