-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvents.cs
More file actions
34 lines (29 loc) · 832 Bytes
/
Events.cs
File metadata and controls
34 lines (29 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace PulseLib;
public class Events
{
#region Singleton pattern
private static readonly Lazy<Events> _lazy = new(() => new Events());
// ReSharper disable once MemberCanBePrivate.Global
public static Events Instance => _lazy.Value;
private Events()
{
Plugin.Logger.LogInfo("Events singleton created");
}
#endregion
#region Events
/// <summary>
/// Invoked when a level on the level select (story mode) was deselected.
/// </summary>
public event EventHandler? LevelDeselected;
/// <summary>
/// Internally used by <see cref="EventsLink.LinkRaiseLevelDeselectedEventPatch"/>.
/// </summary>
public static void RaiseLevelDeselected()
{
#if DEBUG
Plugin.Logger.LogDebug("RaiseLevelDeselected");
#endif
Instance.LevelDeselected?.Invoke(null, EventArgs.Empty);
}
#endregion
}