Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class GameServices
- {
- private static GameServiceContainer container = new GameServiceContainer();
- public static T Get<T>()
- {
- return (T)container.GetService(typeof(T));
- }
- public static void Add<T>(T service)
- {
- container.AddService(typeof(T), service);
- }
- public static void Remove<T>()
- {
- container.RemoveService(typeof(T));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement