public ResourceManager() { sources = new List <IResourceSource>(); objectCaches = new Dictionary <Type, ResourceObjectCache>(); objectFactories = new Dictionary <Type, IObjectFactory <object> >(); var drawableFactory = new DrawableFactory(); RegisterType(typeof(Drawable), drawableFactory); RegisterType(typeof(Skill), new SkillFactory(drawableFactory)); RegisterType(typeof(Bitmap), new BitmapFactory()); RegisterType(typeof(MouseCursor), new MouseCursorFactory()); RegisterType(typeof(Face), new FontFaceFactory()); RegisterType(typeof(Tileset), new TilesetFactory()); RegisterType(typeof(SpriteMaker), new SpriteMakerFactory()); RegisterType(typeof(GameAction), new GameActionFactory()); RegisterType(typeof(ItemProto), new ItemProtoFactory(drawableFactory)); RegisterType(typeof(BuffProto), new BuffProtoFactory(drawableFactory)); var folderSource = new FolderSource("Data"); folderSource.AddSerializer(".ini", new IniResourceSerializer(folderSource.FileSource)); AddSource(folderSource); AddSource(new JarSource("haven-res.jar")); AddSource(new HttpSource(App.Config.ResUrl)); }