Пример #1
0
        public static void Unload(ContentManager manager)
        {
            var @event = new StaticContextEvent();

            StaticGameContext.FireEvent("content_on_unload", @event);
            manager.Unload();
        }
Пример #2
0
        public static T Load <T>(ContentManager manager, string assetName)
        {
            var @event = new StaticContextEvent(manager, assetName);

            StaticGameContext.FireEvent("content_on_load", @event);
            if (@event.ReturnValue != null)
            {
                return((T)@event.ReturnValue);
            }
            return(manager.Load <T>(assetName));
        }