using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; namespace MonoGame.Extended.Tiled.Renderers { public class TiledMapAnimatedLayerModelBuilder : TiledMapLayerModelBuilder { public TiledMapAnimatedLayerModelBuilder() { AnimatedTilesetTiles = new List(); AnimatedTilesetFlipFlags = new List(); } public List AnimatedTilesetTiles { get; } public List AnimatedTilesetFlipFlags { get; } protected override void ClearBuffers() { AnimatedTilesetTiles.Clear(); AnimatedTilesetFlipFlags.Clear(); } protected override TiledMapAnimatedLayerModel CreateModel(GraphicsDevice graphicsDevice, Texture2D texture) { return new TiledMapAnimatedLayerModel(graphicsDevice, texture, Vertices.ToArray(), Indices.ToArray(), AnimatedTilesetTiles.ToArray(), AnimatedTilesetFlipFlags.ToArray()); } } }