From f2bb80f75ec7789f0579133f15adfbb748beb5db Mon Sep 17 00:00:00 2001 From: Sebastian Sejud Date: Thu, 4 Aug 2022 22:05:21 +0200 Subject: [PATCH] restored opacity parsing --- src/TiledMap.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TiledMap.cs b/src/TiledMap.cs index e145a47..52abd53 100644 --- a/src/TiledMap.cs +++ b/src/TiledMap.cs @@ -303,6 +303,7 @@ private TiledLayer ParseTileLayer(XmlNode node) if (attrVisible != null) tiledLayer.visible = attrVisible.Value == "1"; if (attrLocked != null) tiledLayer.locked = attrLocked.Value == "1"; if (attrTint != null) tiledLayer.tintcolor = attrTint.Value; + if (attrOpacity != null) tiledLayer.opacity = float.Parse(attrOpacity.Value); if (attrOffsetX != null) tiledLayer.offsetX = float.Parse(attrOffsetX.Value, CultureInfo.InvariantCulture); if (attrOffsetY != null) tiledLayer.offsetY = float.Parse(attrOffsetY.Value, CultureInfo.InvariantCulture); if (attrParallaxX != null) tiledLayer.offsetX = float.Parse(attrParallaxX.Value, CultureInfo.InvariantCulture); @@ -828,4 +829,4 @@ public bool IsTileFlippedDiagonal(TiledLayer layer, int dataIndex) return (layer.dataRotationFlags[dataIndex] & (FLIPPED_DIAGONALLY_FLAG >> SHIFT_FLIP_FLAG_TO_BYTE)) > 0; } } -} +}