Skip to content

Commit

Permalink
restored opacity parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatiano committed Aug 4, 2022
1 parent 26f32e0 commit f2bb80f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TiledMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -828,4 +829,4 @@ public bool IsTileFlippedDiagonal(TiledLayer layer, int dataIndex)
return (layer.dataRotationFlags[dataIndex] & (FLIPPED_DIAGONALLY_FLAG >> SHIFT_FLIP_FLAG_TO_BYTE)) > 0;
}
}
}
}

0 comments on commit f2bb80f

Please sign in to comment.