summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs b/WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs
new file mode 100644
index 0000000..8313f7b
--- /dev/null
+++ b/WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace WK
+{
+
+ public interface INotification
+ {
+ }
+
+ public static class NotificationExtensions
+ {
+ public static void AddObserver(this INotification _this, string msg, NotificationCenter.NotificatonHandler handler) { NotificationCenter.Instance.AddObserver(_this, msg, handler); }
+ public static void RemoveObserver(this INotification _this, string msg, NotificationCenter.NotificatonHandler handler) { NotificationCenter.Instance.RemoveObserver(_this, msg, handler); }
+ public static void PostNotification(this INotification _this, string msg, params object[] p) { NotificationCenter.Instance.PostNotification(_this, msg, p); }
+
+ }
+}