Blue balls now bounce to da beat

This commit is contained in:
Merlin
2021-07-11 13:32:46 +02:00
parent f67d0e4d92
commit ed75cd00e3
2 changed files with 9 additions and 2 deletions

View File

@ -48,6 +48,8 @@ class GameOverSubstate extends MusicBeatSubstate
bf.playAnim('firstDeath');
}
var startVibin:Bool = false;
override function update(elapsed:Float)
{
super.update(elapsed);
@ -76,6 +78,7 @@ class GameOverSubstate extends MusicBeatSubstate
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished)
{
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
startVibin = true;
}
if (FlxG.sound.music.playing)
@ -88,6 +91,10 @@ class GameOverSubstate extends MusicBeatSubstate
{
super.beatHit();
if (startVibin && !isEnding)
{
bf.playAnim('deathLoop', true);
}
FlxG.log.add('beat');
}