public void Draw(SpriteBatch spriteBatch, AnimatedTileset tileSet)
        {
            Rectangle destination = new Rectangle(0, 0, Engine.TileWidth, Engine.TileHeight);

            foreach (Point p in AnimatedTiles.Keys)
            {
                destination.X = p.X * Engine.TileWidth;
                destination.Y = p.Y * Engine.TileHeight;

                spriteBatch.Draw(tileSet.Texture, destination, tileSet.SourceFrames[AnimatedTiles[p].TileIndex][AnimatedTiles[p].CurrentFrame], Color.White);
            }
        }
        public TileMap(Tileset tileset, AnimatedTileset animatedTileset, MapLayer baseLayer)
        {
            this.animatedSet = animatedTileset;
            tilesets         = new List <Tileset>();
            tilesets.Add(tileset);

            collisionLayer    = new CollisionLayer();
            animatedTileLayer = new AnimatedTileLayer();
            mapLayers         = new List <ILayer>();
            mapLayers.Add(baseLayer);

            mapWidth  = baseLayer.Width;
            mapHeight = baseLayer.Height;
        }
        public TileMap(List <Tileset> tilesets, AnimatedTileset animatedTileSet, MapLayer baseLayer, MapLayer buildingLayer, MapLayer splatterLayer, CollisionLayer collisionLayer, AnimatedTileLayer animatedLayer)
        {
            this.tilesets          = tilesets;
            this.animatedSet       = animatedTileSet;
            this.mapLayers         = new List <ILayer>();
            this.collisionLayer    = collisionLayer;
            this.animatedTileLayer = animatedLayer;

            mapLayers.Add(baseLayer);

            AddLayer(buildingLayer);
            AddLayer(splatterLayer);

            mapWidth  = baseLayer.Width;
            mapHeight = baseLayer.Height;
        }
 public void AddAnimatedTileset(AnimatedTileset tileset)
 {
     animatedSet = tileset;
 }