mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Tidied up formatting #4922
This commit is contained in:
parent
8ea29b6cf2
commit
1839e58581
1 changed files with 5 additions and 8 deletions
|
@ -4,13 +4,13 @@
|
|||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
var CONST = require('../../../const.js');
|
||||
var Base64Decode = require('./Base64Decode');
|
||||
var CONST = require('../../const');
|
||||
var CreateGroupLayer = require('./CreateGroupLayer');
|
||||
var GetFastValue = require('../../../utils/object/GetFastValue');
|
||||
var LayerData = require('../../mapdata/LayerData');
|
||||
var ParseGID = require('./ParseGID');
|
||||
var Tile = require('../../Tile');
|
||||
var CreateGroupLayer = require('./CreateGroupLayer');
|
||||
|
||||
/**
|
||||
* Parses all tilemap layers in a Tiled JSON object into new LayerData objects.
|
||||
|
@ -118,6 +118,7 @@ var ParseTileLayers = function (json, insertNull)
|
|||
{
|
||||
var layerOffsetX = (GetFastValue(curl, 'startx', 0) + curl.x);
|
||||
var layerOffsetY = (GetFastValue(curl, 'starty', 0) + curl.y);
|
||||
|
||||
layerData = new LayerData({
|
||||
name: (curGroupState.name + curl.name),
|
||||
x: (curGroupState.x + GetFastValue(curl, 'offsetx', 0) + layerOffsetX * json.tilewidth),
|
||||
|
@ -130,7 +131,6 @@ var ParseTileLayers = function (json, insertNull)
|
|||
visible: (curGroupState.visible && curl.visible),
|
||||
properties: GetFastValue(curl, 'properties', []),
|
||||
orientation: CONST.fromOrientationString(json.orientation)
|
||||
|
||||
});
|
||||
|
||||
if (layerData.orientation === CONST.HEXAGONAL)
|
||||
|
@ -167,8 +167,7 @@ var ParseTileLayers = function (json, insertNull)
|
|||
// index, x, y, width, height
|
||||
if (gidInfo.gid > 0)
|
||||
{
|
||||
tile = new Tile(layerData, gidInfo.gid, newOffsetX, newOffsetY, json.tilewidth,
|
||||
json.tileheight);
|
||||
tile = new Tile(layerData, gidInfo.gid, newOffsetX, newOffsetY, json.tilewidth, json.tileheight);
|
||||
|
||||
// Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal
|
||||
// propeties into flipX, flipY and rotation
|
||||
|
@ -210,7 +209,6 @@ var ParseTileLayers = function (json, insertNull)
|
|||
visible: (curGroupState.visible && curl.visible),
|
||||
properties: GetFastValue(curl, 'properties', []),
|
||||
orientation: CONST.fromOrientationString(json.orientation)
|
||||
|
||||
});
|
||||
|
||||
if (layerData.orientation === CONST.HEXAGONAL)
|
||||
|
@ -227,8 +225,7 @@ var ParseTileLayers = function (json, insertNull)
|
|||
// index, x, y, width, height
|
||||
if (gidInfo.gid > 0)
|
||||
{
|
||||
tile = new Tile(layerData, gidInfo.gid, x, output.length, json.tilewidth,
|
||||
json.tileheight);
|
||||
tile = new Tile(layerData, gidInfo.gid, x, output.length, json.tilewidth, json.tileheight);
|
||||
|
||||
// Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal
|
||||
// propeties into flipX, flipY and rotation
|
||||
|
|
Loading…
Add table
Reference in a new issue