mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 03:56:31 +00:00
21 lines
616 B
C#
21 lines
616 B
C#
using Microsoft.Xna.Framework.Content;
|
|
|
|
namespace MonoGame.Extended.Tiled
|
|
{
|
|
public static class ContentReaderExtensions
|
|
{
|
|
public static void ReadTiledMapProperties(this ContentReader reader, TiledMapProperties properties)
|
|
{
|
|
var count = reader.ReadInt32();
|
|
|
|
for (var i = 0; i < count; i++)
|
|
{
|
|
var key = reader.ReadString();
|
|
var value = new TiledMapPropertyValue(reader.ReadString());
|
|
ReadTiledMapProperties(reader, value.Properties);
|
|
properties[key] = value;
|
|
}
|
|
}
|
|
}
|
|
}
|