add LdtkFieldInstance and LdtkEntityMap classes; update LdtkSceneBuilder to support entity mapping
This commit is contained in:
167
assets/test.ldtk
167
assets/test.ldtk
@@ -11,7 +11,7 @@
|
||||
"iid": "2c2f2ff0-8560-11f0-9745-f307d35f41a0",
|
||||
"jsonVersion": "1.5.3",
|
||||
"appBuildId": 488493,
|
||||
"nextUid": 25,
|
||||
"nextUid": 27,
|
||||
"identifierStyle": "Capitalize",
|
||||
"toc": [],
|
||||
"worldLayout": "Free",
|
||||
@@ -41,6 +41,41 @@
|
||||
"customCommands": [],
|
||||
"flags": [],
|
||||
"defs": { "layers": [
|
||||
{
|
||||
"__type": "Entities",
|
||||
"identifier": "Entities",
|
||||
"type": "Entities",
|
||||
"uid": 26,
|
||||
"doc": null,
|
||||
"uiColor": null,
|
||||
"gridSize": 16,
|
||||
"guideGridWid": 0,
|
||||
"guideGridHei": 0,
|
||||
"displayOpacity": 1,
|
||||
"inactiveOpacity": 0.6,
|
||||
"hideInList": false,
|
||||
"hideFieldsWhenInactive": true,
|
||||
"canSelectWhenInactive": true,
|
||||
"renderInWorldView": true,
|
||||
"pxOffsetX": 0,
|
||||
"pxOffsetY": 0,
|
||||
"parallaxFactorX": 0,
|
||||
"parallaxFactorY": 0,
|
||||
"parallaxScaling": true,
|
||||
"requiredTags": [],
|
||||
"excludedTags": [],
|
||||
"autoTilesKilledByOtherLayerUid": null,
|
||||
"uiFilterTags": [],
|
||||
"useAsyncRender": false,
|
||||
"intGridValues": [],
|
||||
"intGridValuesGroups": [],
|
||||
"autoRuleGroups": [],
|
||||
"autoSourceLayerDefUid": null,
|
||||
"tilesetDefUid": null,
|
||||
"tilePivotX": 0,
|
||||
"tilePivotY": 0,
|
||||
"biomeFieldUid": null
|
||||
},
|
||||
{
|
||||
"__type": "IntGrid",
|
||||
"identifier": "IntGrid",
|
||||
@@ -669,7 +704,43 @@
|
||||
"tilePivotY": 0,
|
||||
"biomeFieldUid": null
|
||||
}
|
||||
], "entities": [], "tilesets": [
|
||||
], "entities": [
|
||||
{
|
||||
"identifier": "Player",
|
||||
"uid": 25,
|
||||
"tags": [],
|
||||
"exportToToc": false,
|
||||
"allowOutOfBounds": false,
|
||||
"doc": null,
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"resizableX": false,
|
||||
"resizableY": false,
|
||||
"minWidth": null,
|
||||
"maxWidth": null,
|
||||
"minHeight": null,
|
||||
"maxHeight": null,
|
||||
"keepAspectRatio": false,
|
||||
"tileOpacity": 1,
|
||||
"fillOpacity": 1,
|
||||
"lineOpacity": 1,
|
||||
"hollow": false,
|
||||
"color": "#BE4A2F",
|
||||
"renderMode": "Rectangle",
|
||||
"showName": true,
|
||||
"tilesetId": null,
|
||||
"tileRenderMode": "FitInside",
|
||||
"tileRect": null,
|
||||
"uiTileRect": null,
|
||||
"nineSliceBorders": [],
|
||||
"maxCount": 0,
|
||||
"limitScope": "PerLevel",
|
||||
"limitBehavior": "MoveLastOne",
|
||||
"pivotX": 0,
|
||||
"pivotY": 0,
|
||||
"fieldDefs": []
|
||||
}
|
||||
], "tilesets": [
|
||||
{
|
||||
"__cWid": 16,
|
||||
"__cHei": 12,
|
||||
@@ -715,6 +786,48 @@
|
||||
"externalRelPath": null,
|
||||
"fieldInstances": [],
|
||||
"layerInstances": [
|
||||
{
|
||||
"__identifier": "Entities",
|
||||
"__type": "Entities",
|
||||
"__cWid": 16,
|
||||
"__cHei": 16,
|
||||
"__gridSize": 16,
|
||||
"__opacity": 1,
|
||||
"__pxTotalOffsetX": 0,
|
||||
"__pxTotalOffsetY": 0,
|
||||
"__tilesetDefUid": null,
|
||||
"__tilesetRelPath": null,
|
||||
"iid": "332d3780-8560-11f0-9745-0103de4db213",
|
||||
"levelId": 0,
|
||||
"layerDefUid": 26,
|
||||
"pxOffsetX": 0,
|
||||
"pxOffsetY": 0,
|
||||
"visible": true,
|
||||
"optionalRules": [],
|
||||
"intGridCsv": [],
|
||||
"autoLayerTiles": [],
|
||||
"seed": 4277998,
|
||||
"overrideTilesetUid": null,
|
||||
"gridTiles": [],
|
||||
"entityInstances": [
|
||||
{
|
||||
"__identifier": "Player",
|
||||
"__grid": [7,8],
|
||||
"__pivot": [0,0],
|
||||
"__tags": [],
|
||||
"__tile": null,
|
||||
"__smartColor": "#BE4A2F",
|
||||
"iid": "3a675850-8560-11f0-9745-41d5f1b372f4",
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"defUid": 25,
|
||||
"px": [112,128],
|
||||
"fieldInstances": [],
|
||||
"__worldX": 112,
|
||||
"__worldY": 128
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__identifier": "IntGrid",
|
||||
"__type": "IntGrid",
|
||||
@@ -915,6 +1028,31 @@
|
||||
"externalRelPath": null,
|
||||
"fieldInstances": [],
|
||||
"layerInstances": [
|
||||
{
|
||||
"__identifier": "Entities",
|
||||
"__type": "Entities",
|
||||
"__cWid": 16,
|
||||
"__cHei": 16,
|
||||
"__gridSize": 16,
|
||||
"__opacity": 1,
|
||||
"__pxTotalOffsetX": 0,
|
||||
"__pxTotalOffsetY": 0,
|
||||
"__tilesetDefUid": null,
|
||||
"__tilesetRelPath": null,
|
||||
"iid": "332d5e90-8560-11f0-9745-d935367db062",
|
||||
"levelId": 23,
|
||||
"layerDefUid": 26,
|
||||
"pxOffsetX": 0,
|
||||
"pxOffsetY": 0,
|
||||
"visible": true,
|
||||
"optionalRules": [],
|
||||
"intGridCsv": [],
|
||||
"autoLayerTiles": [],
|
||||
"seed": 8641114,
|
||||
"overrideTilesetUid": null,
|
||||
"gridTiles": [],
|
||||
"entityInstances": []
|
||||
},
|
||||
{
|
||||
"__identifier": "IntGrid",
|
||||
"__type": "IntGrid",
|
||||
@@ -1100,6 +1238,31 @@
|
||||
"externalRelPath": null,
|
||||
"fieldInstances": [],
|
||||
"layerInstances": [
|
||||
{
|
||||
"__identifier": "Entities",
|
||||
"__type": "Entities",
|
||||
"__cWid": 16,
|
||||
"__cHei": 16,
|
||||
"__gridSize": 16,
|
||||
"__opacity": 1,
|
||||
"__pxTotalOffsetX": 0,
|
||||
"__pxTotalOffsetY": 0,
|
||||
"__tilesetDefUid": null,
|
||||
"__tilesetRelPath": null,
|
||||
"iid": "332d5e91-8560-11f0-9745-af9a0227805e",
|
||||
"levelId": 24,
|
||||
"layerDefUid": 26,
|
||||
"pxOffsetX": 0,
|
||||
"pxOffsetY": 0,
|
||||
"visible": true,
|
||||
"optionalRules": [],
|
||||
"intGridCsv": [],
|
||||
"autoLayerTiles": [],
|
||||
"seed": 4469038,
|
||||
"overrideTilesetUid": null,
|
||||
"gridTiles": [],
|
||||
"entityInstances": []
|
||||
},
|
||||
{
|
||||
"__identifier": "IntGrid",
|
||||
"__type": "IntGrid",
|
||||
|
Reference in New Issue
Block a user