You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
-
- public static class GameEvents
- {
- public static void Subscribe<T>(Action<T> callback) where T : class
- {
- GameEvents._dispatcher.Subscribe<T>(callback);
- }
-
- public static void Unsubscribe<T>(Action<T> callback) where T : class
- {
- GameEvents._dispatcher.Unsubscribe<T>(callback);
- }
-
- public static void Invoke<T>(T evt) where T : class
- {
- GameEvents._dispatcher.Invoke<T>(evt);
- }
-
- private static EventDispatcher _dispatcher = new EventDispatcher();
- }
|