The description of the method stated that you could pass a string to look up an object layer based on its name, but the original code only looked for a gui property, regardless of type.
I'm using Tiled 0.11.0 on OSX, and my exported json-file doesn't contain a gui property on the object layers. Here's a snippet of my file:
```
{
"layers":[
{
"draworder":"topdown",
"height":0,
"name":"Objects",
"objects":[
{
"height":48,
"id":1,
"name":"pier",
"properties":
{
},
"rotation":0,
"type":"",
"visible":true,
"width":64,
"x":208,
"y":240
}],
"opacity":1,
"properties":
{
"type":"pier"
},
"type":"objectgroup",
"visible":true,
"width":0,
"x":0,
"y":0
}]
}]
}
```
The property in my file is called id and not uid. This might be due to changes in one of the later releases of Tiled. I kept the check for uid to avoid possibly breaking compatibility with older versions of Tiled.
I also added scaling of the sprite.
Feel free to make formatting changes, or rewrite the function to better fit the programming style of Phaser.
Since Tilemap.getTile lets you specify wether to return null
or an empty tile when index is -1, the WorldXY equivalent
should offer the same possibility for a more unified interface.
* Passing a value of zero as the value of duration causes the
calculations performed in Tween#update to divide by zero when
calculating the next step for the tween. This causes the tweened
property value to be set to NaN having undesireable results and
also, causes the tween to never end since the ending criteria are
never met.
Graphics.drawArc would only move to the center position of the first arc created and ignore any subsequent arcs.
Graphics.drawArc now correctly renders multiple arcs across both WebGL and Canvas. You no longer need to specifically call moveTo to move into the correct place to draw the arc.
Graphics.drawArc now bails out if the startAngle = the endAngle and/or the sweep is invalid *before* adjusting any points.
Graphics.drawArc now correctly handles the fill on the CanvasRenderer if the arc is a subsequent arc and no line style is set.