Implement pause functionality with UI and input bindings

This commit is contained in:
2025-12-13 16:13:22 +01:00
parent 4ae41b3ce9
commit c1d0af9a39
7 changed files with 354 additions and 4 deletions

View File

@@ -66,5 +66,19 @@ namespace Infrastructure.Unity
sfxSource.PlayOneShot(clip);
}
public void SetPaused(bool isPaused)
{
if (isPaused)
{
musicSource.Pause();
}
else
{
musicSource.UnPause();
}
AudioListener.pause = isPaused;
}
}
}