mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes initial level positioning
This commit is contained in:
parent
aaa1db4468
commit
cad112419d
14 changed files with 91 additions and 61 deletions
|
|
@ -16,16 +16,14 @@ function (Parent, Settings, Nc) {
|
|||
TiledLevel.prototype = Object.create(Parent.prototype);
|
||||
|
||||
TiledLevel.prototype.setup = function(levelData) {
|
||||
/*
|
||||
FIXME: find a name for this shit!
|
||||
for (var i = 0; i < levelData.layers.length; i++) {
|
||||
var layerOptions = levelData.layers[i];
|
||||
layerOptions.z = i;
|
||||
if(!this.layerMapping[layerOptions.name]) {
|
||||
this.createLayer(layerOptions);
|
||||
}
|
||||
var tilesLayerData = this.getLayer(levelData, "tiles");
|
||||
this.levelSize = {
|
||||
width: tilesLayerData.width * Settings.TILE_SIZE,
|
||||
height: tilesLayerData.height * Settings.TILE_SIZE
|
||||
};
|
||||
*/
|
||||
|
||||
Nc.trigger(Nc.ns.client.view.layer.levelSizeUpdate, this.levelSize);
|
||||
|
||||
Parent.prototype.setup.call(this, levelData);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue