Ejemplo n.º 1
0
 public TexturePackLoader([NotNull] IContentLoader <TRawTexture> contentLoader,
                          [NotNull] ITileProducer <TTile, TTexture, TRawTexture> tileProducer,
                          IFileSystemAdapter fileSystem)
 {
     this.contentLoader = contentLoader ?? throw new ArgumentNullException(nameof(contentLoader));
     this.tileProducer  = tileProducer ?? throw new ArgumentNullException(nameof(tileProducer));
     this.fileSystem    = fileSystem ?? new DefaultFileSystemAdapter();
 }
Ejemplo n.º 2
0
        public DungeonTileSet(IContentLoader <TRawTexture> loader,
                              ITileProducer <TTile, TTexture, TRawTexture> producer)
        {
            this.loader   = loader;
            this.producer = producer;

            TileSize = new IntDimension(50, 24);
            tp       = new TexturePack <TTile>("default",
                                               TileSize,
                                               TextureType.Isometric,
                                               LoadDecorations().ToArray());
        }
Ejemplo n.º 3
0
        public GridTextureFile(string name,
                               IntDimension tileSize,
                               [NotNull] ITileProducer <TTile, TTexture, TRawTexture> producer,
                               [NotNull] IContentLoader <TRawTexture> loader,
                               params TileGrid[] grids)
        {
            if (grids == null)
            {
                throw new ArgumentNullException(nameof(grids));
            }

            this.tileSize = tileSize;
            this.producer = producer ?? throw new ArgumentNullException(nameof(producer));
            this.loader   = loader ?? throw new ArgumentNullException(nameof(loader));
            Name          = name ?? throw new ArgumentNullException(nameof(name));
            Grids         = new List <TileGrid>(grids);
        }
Ejemplo n.º 4
0
 public TexturePackLoader([NotNull] IContentLoader <TRawTexture> contentLoader,
                          [NotNull] ITileProducer <TTile, TTexture, TRawTexture> tileProducer,
                          string basePath = null) : this(contentLoader, tileProducer, new DefaultFileSystemAdapter(basePath))
 {
 }