mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
ParseTiledJSON eslint auto fix
This commit is contained in:
parent
f9f6d95097
commit
1ba75cd50c
1 changed files with 13 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
var Formats = require('../Formats');
|
||||
var Tileset = require('../Tileset');
|
||||
var Tile = require('../Tile');
|
||||
var Extend = require("../../../utils/object/Extend");
|
||||
var Extend = require('../../../utils/object/Extend');
|
||||
|
||||
var ParseJSONTiled = function (key, json)
|
||||
{
|
||||
|
@ -310,7 +310,8 @@ var ParseJSONTiled = function (key, json)
|
|||
var objects = {};
|
||||
var collision = {};
|
||||
|
||||
function slice (obj, fields) {
|
||||
function slice (obj, fields)
|
||||
{
|
||||
|
||||
var sliced = {};
|
||||
|
||||
|
@ -348,7 +349,7 @@ var ParseJSONTiled = function (key, json)
|
|||
|
||||
gid: curo.objects[v].gid,
|
||||
name: curo.objects[v].name,
|
||||
type: curo.objects[v].hasOwnProperty("type") ? curo.objects[v].type : "",
|
||||
type: curo.objects[v].hasOwnProperty('type') ? curo.objects[v].type : '',
|
||||
x: curo.objects[v].x,
|
||||
y: curo.objects[v].y,
|
||||
visible: curo.objects[v].visible,
|
||||
|
@ -394,6 +395,7 @@ var ParseJSONTiled = function (key, json)
|
|||
collision[curo.name].push(object);
|
||||
objects[curo.name].push(object);
|
||||
}
|
||||
|
||||
// polygon
|
||||
else if (curo.objects[v].polygon)
|
||||
{
|
||||
|
@ -410,12 +412,14 @@ var ParseJSONTiled = function (key, json)
|
|||
objects[curo.name].push(object);
|
||||
|
||||
}
|
||||
|
||||
// ellipse
|
||||
else if (curo.objects[v].ellipse)
|
||||
{
|
||||
var object = slice(curo.objects[v], [ 'name', 'type', 'ellipse', 'x', 'y', 'width', 'height', 'visible', 'rotation', 'properties' ]);
|
||||
objects[curo.name].push(object);
|
||||
}
|
||||
|
||||
// otherwise it's a rectangle
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue