Commit graph

4 commits

Author SHA1 Message Date
Richard Davey
8aa6385cec Fixed JSDocs 2021-10-06 21:39:44 +01:00
Richard Davey
5dfab5f5d9 eslint and jsdoc fixes for #5697 2021-09-23 16:02:52 +01:00
Brown Dragon
a420b6e46a Improve ObjectHelper docs even if they are just internal only 2021-05-21 09:49:19 -04:00
Brown Dragon
02e67e682f Addresses https://github.com/photonstorm/phaser/issues/5697
This diff adds:
* `type` support to `createFromObjects`. See https://doc.mapeditor.org/en/stable/manual/custom-properties/#typed-tiles for the description in Tiled; this is currently not supported as a parameter, and its usage is documented within the diff.
* `createFromObjects` will also examine the tileset. As per the above link, created objects are supposed to inherit properties from the tile with the same gid, but Phaser doesn't do that right now. After this diff it optionally will, by passing an additional parameter to `createFromObjects`.
> NOTE: I'd be very happy to make this a default behavior, but that's somewhat backwards breaking
* `createFromObjects` will attempt to use the same texture and frame as Tiled when creating the object. This will behave poorly if there is no such frame (for instance, if the texture were loaded with `this.load.image` instead of `this.load.spritesheet`, or using different geometry. However, the current behavior draws missingimage, so this is a strong improvement.
2021-05-13 17:05:03 -04:00