mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
layer bugfixing
This commit is contained in:
parent
d29c64385d
commit
1d3ad16a07
9 changed files with 56 additions and 9 deletions
|
|
@ -17,6 +17,7 @@ define([
|
|||
|
||||
this.layerMapping = {
|
||||
tiles: this.createTiles.bind(this),
|
||||
collision: this.createTiles.bind(this),
|
||||
items: this.createItems.bind(this),
|
||||
spawnpoints: this.createSpawnPoints.bind(this)
|
||||
};
|
||||
|
|
@ -34,7 +35,10 @@ define([
|
|||
var layerOptions = levelData.layers[i];
|
||||
layerOptions.z = i;
|
||||
if(this.layerMapping[layerOptions.name]) {
|
||||
|
||||
this.layerMapping[layerOptions.name](layerOptions);
|
||||
} else {
|
||||
console.warn('No layerMapping for level file layer: ' + layerOptions.name);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -87,7 +91,7 @@ define([
|
|||
return { x: o.x, y: o.y };
|
||||
});
|
||||
|
||||
Parent.prototype.createSpawnPoints(this, points);
|
||||
Parent.prototype.createSpawnPoints.call(this, points);
|
||||
};
|
||||
|
||||
TiledLevel.prototype.gatherOptions = function(tiledObject) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue