diff options
author | chai <215380520@qq.com> | 2023-05-15 09:28:11 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-05-15 09:28:11 +0800 |
commit | 3b036c6de871aa519a1f7fbfb52e09618945041f (patch) | |
tree | d5dc6d4f1d501e4ce3c6d69ca7a698a03634490c /WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs | |
parent | 6fb204d494b897907d655b5752196983a82ceba2 (diff) |
*misc
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs')
-rw-r--r-- | WorldlineKeepers/Assets/Scripts/Tools/Notification/NotificationExtensions.cs | 17 |
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); } + + } +} |