mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 12:06:37 +00:00
* Add Tiled Content Pipeline library to NuGet * Update Tiled NuGet package elements. * Remove dependency on Graphics * Update csproj for removal of Graphics dependency * Fix build errors * Fix problems
27 lines
751 B
C#
27 lines
751 B
C#
#region
|
|
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Content;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using MonoGame.Extended.Content;
|
|
|
|
#endregion
|
|
|
|
namespace MonoGame.Extended.Tiled
|
|
{
|
|
public class TiledMapImageLayer : TiledMapLayer, IMovable
|
|
{
|
|
public Vector2 Position { get; set; }
|
|
public Texture2D Texture { get; }
|
|
|
|
internal TiledMapImageLayer(ContentReader input)
|
|
: base(input)
|
|
{
|
|
var textureAssetName = input.GetRelativeAssetName(input.ReadString());
|
|
Texture = input.ContentManager.Load<Texture2D>(textureAssetName);
|
|
var x = input.ReadSingle();
|
|
var y = input.ReadSingle();
|
|
Position = new Vector2(x, y);
|
|
}
|
|
}
|
|
} |