blob: b3762524bcf82ef048fa17cc3722604e8c9a58ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using MonoGame.Extended.Tiled.Serialization;
namespace MonoGame.Extended.Content.Pipeline.Tiled;
public class TiledContentItem<T>: ContentItem<T>
{
public TiledContentItem(T data) : base(data)
{
}
public void BuildExternalReference<T>(ContentProcessorContext context, TiledMapImageContent image)
{
var parameters = new OpaqueDataDictionary
{
{ "ColorKeyColor", image.TransparentColor },
{ "ColorKeyEnabled", true }
};
BuildExternalReference<Texture2DContent>(context, image.Source, parameters);
}
}
|