public TiledTileset createTileset(Texture2D texture, int firstId, int tileWidth, int tileHeight, bool isStandardTileset, int spacing = 2, int margin = 2, int tileCount = 1, int columns = 1)
        {
            TiledTileset tileset;

            if (isStandardTileset)
            {
                tileset = new TiledTileset(texture, firstId, tileWidth, tileHeight, spacing, margin, tileCount, columns);
            }
            else
            {
                tileset = new TiledImageCollectionTileset(texture, firstId);
            }

            if (tileset.tileWidth > largestTileWidth)
            {
                largestTileWidth = tileset.tileWidth;
            }

            if (tileset.tileHeight > largestTileHeight)
            {
                largestTileHeight = tileset.tileHeight;
            }

            tilesets.Add(tileset);

            return(tileset);
        }
Example #2
0
        public TiledTileset createTileset(Texture2D texture, int firstId, int tileWidth, int tileHeight, int spacing = 2, int margin = 2)
        {
            var tileset = new TiledTileset(texture, firstId, tileWidth, tileHeight, spacing, margin);

            _tilesets.Add(tileset);
            return(tileset);
        }
Example #3
0
        public TiledTileset createTileset(Texture2D texture, int firstId, int tileWidth, int tileHeight, bool isStandardTileset, int spacing = 2, int margin = 2)
        {
            TiledTileset tileset;

            if (isStandardTileset)
            {
                tileset = new TiledTileset(texture, firstId, tileWidth, tileHeight, spacing, margin);
            }
            else
            {
                tileset = new TiledImageCollectionTileset(texture, firstId);
            }

            _tilesets.Add(tileset);

            return(tileset);
        }