hellbound/Assets/Sources/Feel/MMTools/Tools/MMAudio/MMSoundManager/Events/MMSoundManagerEvent.cs

37 lines
973 B
C#
Raw Normal View History

2021-11-26 11:16:25 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
public enum MMSoundManagerEventTypes
{
SaveSettings,
LoadSettings,
ResetSettings
}
/// <summary>
/// This event will let you trigger a save/load/reset on the MMSoundManager settings
///
/// Example : MMSoundManagerEvent.Trigger(MMSoundManagerEventTypes.SaveSettings);
/// will save settings.
/// </summary>
public struct MMSoundManagerEvent
{
public MMSoundManagerEventTypes EventType;
public MMSoundManagerEvent(MMSoundManagerEventTypes eventType)
{
EventType = eventType;
}
static MMSoundManagerEvent e;
public static void Trigger(MMSoundManagerEventTypes eventType)
{
e.EventType = eventType;
MMEventManager.TriggerEvent(e);
}
}
}