public Project() { Uid = Guid.NewGuid(); _services = new ServiceContainer(); Name = "Project"; _levels = new NamedResourceCollection<Level>(); _levels.Modified += (s, e) => OnModified(EventArgs.Empty); _libraryManager = new LibraryManager(); _libraryManager.Libraries.Modified += (s, e) => OnModified(EventArgs.Empty); Library defaultLibrary = new Library(); _libraryManager.Libraries.Add(defaultLibrary); Extra = new List<XmlElement>(); _texturePool = new MetaTexturePool(); _texturePool.AddPool(defaultLibrary.Uid, defaultLibrary.TexturePool); _tilePools = new MetaTilePoolManager(_texturePool); _tilePools.AddManager(defaultLibrary.Uid, defaultLibrary.TilePoolManager); _objectPools = new MetaObjectPoolManager(_texturePool); _objectPools.AddManager(defaultLibrary.Uid, defaultLibrary.ObjectPoolManager); _tileBrushes = new MetaTileBrushManager(); _tileBrushes.AddManager(defaultLibrary.Uid, defaultLibrary.TileBrushManager); SetDefaultLibrary(defaultLibrary); _services.AddService(typeof(TilePoolManager), _tilePools); ResetModified(); }
public Project() { Uid = Guid.NewGuid(); _services = new ServiceContainer(); Name = "Project"; _levels = new NamedResourceCollection <Level>(); _levels.Modified += (s, e) => OnModified(EventArgs.Empty); _libraryManager = new LibraryManager(); _libraryManager.Libraries.Modified += (s, e) => OnModified(EventArgs.Empty); Library defaultLibrary = new Library(); _libraryManager.Libraries.Add(defaultLibrary); Extra = new List <XmlElement>(); _texturePool = new MetaTexturePool(); _texturePool.AddPool(defaultLibrary.Uid, defaultLibrary.TexturePool); _tilePools = new MetaTilePoolManager(_texturePool); _tilePools.AddManager(defaultLibrary.Uid, defaultLibrary.TilePoolManager); _objectPools = new MetaObjectPoolManager(_texturePool); _objectPools.AddManager(defaultLibrary.Uid, defaultLibrary.ObjectPoolManager); _tileBrushes = new MetaTileBrushManager(); _tileBrushes.AddManager(defaultLibrary.Uid, defaultLibrary.TileBrushManager); SetDefaultLibrary(defaultLibrary); _services.AddService(typeof(TilePoolManager), _tilePools); ResetModified(); }
public MetaObjectPoolManager(MetaTexturePool texturePool) { _texturePool = texturePool; }
public MetaTilePoolManager(MetaTexturePool texturePool) { _texturePool = texturePool; }