Merge pull request #48 from gedehari/master

Music issues throughout the game
This commit is contained in:
Cameron Taylor
2020-12-12 22:10:06 -08:00
committed by GitHub
2 changed files with 16 additions and 6 deletions

View File

@ -425,11 +425,13 @@ class PlayState extends MusicBeatState
function startSong():Void
{
startingSong = false;
previousFrameTime = FlxG.game.ticks;
lastReportedPlayheadPosition = 0;
startingSong = false;
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
if (!paused)
FlxG.sound.playMusic("assets/music/" + SONG.song + "_Inst" + TitleState.soundExt, 1, false);
FlxG.sound.music.onComplete = endSong;
vocals.play();
}
@ -623,7 +625,7 @@ class PlayState extends MusicBeatState
{
if (paused)
{
if (FlxG.sound.music != null)
if (FlxG.sound.music != null && !startingSong)
{
FlxG.sound.music.play();
Conductor.songPosition = FlxG.sound.music.time;