Skip to content

Commit

Permalink
Stopped audio from level one when you go back to main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
softdrawss committed May 17, 2024
1 parent 088e4ab commit ed1f4de
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions TheOneScripting/UiScriptPause.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,7 @@ public override void Update()
if ((Input.GetControllerButton(Input.ControllerButtonCode.X) || Input.GetKeyboardButton(Input.KeyboardCode.RETURN)) && canvas.GetSelectedButton() == 4)
{
attachedGameObject.source.Play(IAudioSource.AudioEvent.UI_CLICK);
//if (playerGO.source.currentID == IAudioSource.AudioEvent.A_COMBAT_1)
//{
// playerGO.source.Stop(IAudioSource.AudioEvent.A_COMBAT_1);
//}
//if (playerGO.source.currentID == IAudioSource.Events.A_AMBIENT_1)
//{
// playerGO.source.Stop(IAudioSource.Events.A_AMBIENT_1);
//}
playerGO.source.Play(IAudioSource.AudioEvent.STOPMUSIC);

SceneManager.LoadScene("MainMenu");
}
Expand Down

0 comments on commit ed1f4de

Please sign in to comment.