Merge pull request #1259 from SimplyMerlin/synced-death-screen

Blue balls now bounce to da beat
This commit is contained in:
Kade M 2021-07-11 19:29:35 -07:00 committed by GitHub
commit d48a72fca9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -224,7 +224,7 @@ class Character extends FlxSprite
animation.addByPrefix('hey', 'BF HEY', 24, false);
animation.addByPrefix('firstDeath', "BF dies", 24, false);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, false);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
animation.addByPrefix('scared', 'BF idle shaking', 24);
@ -300,7 +300,7 @@ class Character extends FlxSprite
frames = Paths.getSparrowAtlas('bfPixelsDEAD','shared',true);
animation.addByPrefix('singUP', "BF Dies pixel", 24, false);
animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false);
animation.addByPrefix('deathLoop', "Retry Loop", 24, true);
animation.addByPrefix('deathLoop', "Retry Loop", 24, false);
animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false);
animation.play('firstDeath');

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');
}