using System; public static class GameEvents { public static void Subscribe(Action callback) where T : class { GameEvents._dispatcher.Subscribe(callback); } public static void Unsubscribe(Action callback) where T : class { GameEvents._dispatcher.Unsubscribe(callback); } public static void Invoke(T evt) where T : class { GameEvents._dispatcher.Invoke(evt); } private static EventDispatcher _dispatcher = new EventDispatcher(); }