From 1f4bb9b2319cadc6c1192001a2fca8e9c73bcab8 Mon Sep 17 00:00:00 2001 From: Baylee Schmeisser <119542904+mxbaylee@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:57:17 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=AD=20Update=20TiledMapLayer=20Object?= =?UTF-8?q?=20definition=20to=20include=20height=20and=20width.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the Tiled output I got locally, I got an object smilar to this, where height and width are inaccessible due to the type definition here. ``` { "height":63.7613636363636, "id":8, "name":"", "rotation":0, "type":"", "visible":true, "width":15.6306818181818, "x":32.1846590909091, "y":48.1193181818182 }, ``` --- hxd/res/TiledMap.hx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hxd/res/TiledMap.hx b/hxd/res/TiledMap.hx index 115274b942..f8e09cfe37 100644 --- a/hxd/res/TiledMap.hx +++ b/hxd/res/TiledMap.hx @@ -5,7 +5,14 @@ typedef TiledMapLayer = { var data : Array; var name : String; var opacity : Float; - var objects : Array<{ x: Int, y : Int, name : String, type : String }>; + var objects : Array<{ + x : Float, + y : Float, + height : Float, + width : Float, + name : String, + type : String + }>; } typedef TiledMapData = {