colol workflow??

This commit is contained in:
Cameron Taylor
2020-12-13 01:42:48 -05:00
parent 62446d47c4
commit 69e9be5f8f
4 changed files with 43 additions and 11 deletions

View File

@ -627,10 +627,7 @@ class PlayState extends MusicBeatState
{
if (FlxG.sound.music != null && !startingSong)
{
FlxG.sound.music.play();
Conductor.songPosition = FlxG.sound.music.time;
vocals.time = Conductor.songPosition;
vocals.play();
resyncVocals();
}
if (!startTimer.finished)
@ -641,6 +638,16 @@ class PlayState extends MusicBeatState
super.closeSubState();
}
function resyncVocals():Void
{
vocals.pause();
FlxG.sound.music.play();
Conductor.songPosition = FlxG.sound.music.time;
vocals.time = Conductor.songPosition;
vocals.play();
}
private var paused:Bool = false;
var startedCountdown:Bool = false;
var canPause:Bool = true;
@ -800,7 +807,7 @@ class PlayState extends MusicBeatState
switch (totalBeats)
{
case 128, 129, 130:
vocals.volume = 0;
vocals.volume = 0;
// FlxG.sound.music.stop();
// curLevel = 'Fresh';
// FlxG.switchState(new PlayState());
@ -1445,12 +1452,9 @@ class PlayState extends MusicBeatState
{
if (SONG.needsVoices)
{
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet
|| vocals.time < Conductor.songPosition - Conductor.stepCrochet)
if (vocals.time > Conductor.songPosition + 20 || vocals.time < Conductor.songPosition - 20)
{
vocals.pause();
vocals.time = Conductor.songPosition;
vocals.play();
resyncVocals();
}
}