Skip to content
Snippets Groups Projects
Commit 5f6a7310 authored by Trandinh Thien's avatar Trandinh Thien
Browse files

added game over song

parent a42e0e2d
No related branches found
No related tags found
No related merge requests found
......@@ -308,6 +308,11 @@ namespace Controller
}
if (GameFunction.isGameOver())
{
if (menuMusicCounter == 0)
{
Sounds.playGameOverSong();
menuMusicCounter++;
}
GameState.gameOver = true;
break;
}
......@@ -323,6 +328,11 @@ namespace Controller
}
if (GameFunction.isGameOver())
{
if (menuMusicCounter == 0)
{
Sounds.playGameOverSong();
menuMusicCounter++;
}
GameState.gameOver = true;
break;
}
......@@ -581,9 +591,12 @@ namespace Controller
else if(choice == "MenuSong")
{
return MenuSong;
}else
}else if(choice == "MapSong")
{
return mapSong;
}else
{
return gameOverSong;
}
}
......
......@@ -58,7 +58,7 @@ namespace View
if (play == true)
{
SoundEffectInstance MapSong = Controller.Game.Instance.getSounds("mapSong").CreateInstance();
SoundEffectInstance MapSong = Controller.Game.Instance.getSounds("MapSong").CreateInstance();
MapSong.IsLooped = true;
MapSong.Play();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment