SHADE_Y3/Assets/Scripts/Audio/AudioHandler.cs

32 lines
738 B
C#
Raw Normal View History

2023-02-02 16:58:40 +08:00
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.Audio
{
public static class AudioHandler
{
public static Dictionary<string, AudioClipHandler> audioClipHandlers = new Dictionary<string, AudioClipHandler>();
//Functions here, maybe
2023-03-01 17:36:02 +08:00
public static void StopAllSounds(bool fadeOut)
2023-02-04 01:44:00 +08:00
{
foreach (KeyValuePair<string, AudioClipHandler> h in audioClipHandlers)
{
h.Value.Stop(fadeOut);
}
}
2023-03-01 17:36:02 +08:00
public static void PauseAllSounds(bool pause)
{
foreach (KeyValuePair<string, AudioClipHandler> h in audioClipHandlers)
{
h.Value.SetPause(pause);
}
}
2023-02-02 16:58:40 +08:00
}
}