SamsonGame/Assets/Sources/Feel/MMTools/Tools/MMAudio/MMSoundManager/Events/MMSoundManagerAllSoundsCont...

36 lines
1.1 KiB
C#
Raw Permalink Normal View History

2021-12-29 20:50:11 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
public enum MMSoundManagerAllSoundsControlEventTypes
{
Pause, Play, Stop, Free, FreeAllButPersistent, FreeAllLooping
}
/// <summary>
/// This event will let you pause/play/stop/free all sounds playing through the MMSoundManager at once
///
/// Example : MMSoundManagerAllSoundsControlEvent.Trigger(MMSoundManagerAllSoundsControlEventTypes.Stop);
/// will stop all sounds playing at once
/// </summary>
public struct MMSoundManagerAllSoundsControlEvent
{
public MMSoundManagerAllSoundsControlEventTypes EventType;
public MMSoundManagerAllSoundsControlEvent(MMSoundManagerAllSoundsControlEventTypes eventType)
{
EventType = eventType;
}
static MMSoundManagerAllSoundsControlEvent e;
public static void Trigger(MMSoundManagerAllSoundsControlEventTypes eventType)
{
e.EventType = eventType;
MMEventManager.TriggerEvent(e);
}
}
}