From 20919e517c386efc347e3fe94a8cc94ab415930b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 7 Oct 2024 15:29:58 -0400 Subject: [PATCH] fix: use `parallaxx` and `parallaxy` from the tiled tmx parallax typo fix --- flixel/addons/editors/tiled/TiledLayer.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flixel/addons/editors/tiled/TiledLayer.hx b/flixel/addons/editors/tiled/TiledLayer.hx index ca39fe80..38e07724 100644 --- a/flixel/addons/editors/tiled/TiledLayer.hx +++ b/flixel/addons/editors/tiled/TiledLayer.hx @@ -1,7 +1,7 @@ package flixel.addons.editors.tiled; -import openfl.utils.ByteArray; import haxe.xml.Access; +import openfl.utils.ByteArray; /** * Base class for Tiled object and tile layers @@ -24,6 +24,9 @@ class TiledLayer /** @since 2.1.0 */ public var offsetY:Float; + public var parallaxX:Float; + public var parallaxY:Float; + function new(source:Access, parent:TiledMap) { properties = new TiledPropertySet(); @@ -33,6 +36,8 @@ class TiledLayer opacity = (source.has.opacity) ? Std.parseFloat(source.att.opacity) : 1.0; offsetX = (source.has.offsetx) ? Std.parseFloat(source.att.offsetx) : 0.0; offsetY = (source.has.offsety) ? Std.parseFloat(source.att.offsety) : 0.0; + parallaxX = (source.has.parallaxx) ? Std.parseFloat(source.att.parallaxx) : 1.0; + parallaxY = (source.has.parallaxy) ? Std.parseFloat(source.att.parallaxy) : 1.0; loadProperties(source); }