Skip to content

Commit 9570de7

Browse files
committed
Fix week7-balledLines
1 parent 17539a6 commit 9570de7

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
var sound:Sound;
1+
var sound:FlxSound;
22

3-
function create()
4-
sound = Paths.sound('jeffGameover/jeffGameover-' + FlxG.random.int(1, 25, !Options.naughtyness ? [1, 3, 8, 13, 17, 21] : null));
3+
function create() {
4+
sound = FlxG.sound.load(Paths.sound('jeffGameover/jeffGameover-' + FlxG.random.int(1, 25, !Options.naughtyness ? [1, 3, 8, 13, 17, 21] : null)));
5+
sound.onComplete = () -> FlxG.sound.music.fadeIn(4, 0.2, 1);
6+
}
57

6-
function beatHit(cur:Int) if (cur == 0) {
7-
FlxG.sound.play(sound, 1, false, null, true, () -> if (!isEnding) FlxG.sound.music.fadeIn(4, 0.2, 1));
8+
function postDeathStart() {
9+
sound.play();
810
FlxG.sound.music.volume = 0.2;
911
}

source/funkin/game/GameOverSubstate.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class GameOverSubstate extends MusicBeatSubstate
115115
CoolUtil.playMusic(Paths.music(gameOverSong), false, 1, true, Flags.DEFAULT_BPM);
116116
character.playAnim("deathLoop", true, DANCE);
117117
cancelConductorUpdate = false;
118+
119+
gameoverScript.call("postDeathStart");
118120
}
119121
}
120122

0 commit comments

Comments
 (0)