mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
preloading all image layer images
This commit is contained in:
parent
85867f92af
commit
be3da8d2a5
1 changed files with 6 additions and 3 deletions
|
|
@ -56,9 +56,12 @@ function (Parent, Settings, Nc) {
|
|||
paths.push(texturePath);
|
||||
};
|
||||
|
||||
// FIXME: iterate through image layers and add images
|
||||
var background = this.getLayer(levelData, "background");
|
||||
paths.push(Settings.MAPS_PATH + background.image);
|
||||
for (var i = 0; i < levelData.layers.length; i++) {
|
||||
var layer = levelData.layers[i];
|
||||
if (layer.type == "imagelayer") {
|
||||
paths.push(Settings.MAPS_PATH + layer.image);
|
||||
}
|
||||
};
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue