diff --git a/cocos2d/core/load-pipeline/downloader.js b/cocos2d/core/load-pipeline/downloader.js index 5915d13da5..bad57dd211 100644 --- a/cocos2d/core/load-pipeline/downloader.js +++ b/cocos2d/core/load-pipeline/downloader.js @@ -263,6 +263,15 @@ function downloadUuid (item, callback) { item.url = url; item.isRawAsset = isRawAsset; if (isRawAsset) { + self.pipeline._items.map[url] = { + id: url, + url: url, + type: Path.extname(url).toLowerCase().substr(1), + error: null, + alias: item.id, + complete: true + }; + var ext = Path.extname(url).toLowerCase(); if (!ext) { callback(new Error('Download Uuid: can not find type of raw asset[' + uuid + ']: ' + url)); diff --git a/cocos2d/core/load-pipeline/loading-items.js b/cocos2d/core/load-pipeline/loading-items.js index ced9e16ade..386c9fca0c 100644 --- a/cocos2d/core/load-pipeline/loading-items.js +++ b/cocos2d/core/load-pipeline/loading-items.js @@ -124,7 +124,17 @@ JS.mixin(LoadingItems.prototype, CallbacksInvoker.prototype, { */ getContent: function (id) { var item = this.map[id]; - return item ? item.content : null; + var ret = null; + if (item) { + if (item.content) { + ret = item.content; + } + else if (item.alias) { + ret = this.getContent(item.alias); + } + } + + return ret; }, /** diff --git a/cocos2d/tilemap/CCTiledMap.js b/cocos2d/tilemap/CCTiledMap.js index 963490045d..ccb04e9576 100644 --- a/cocos2d/tilemap/CCTiledMap.js +++ b/cocos2d/tilemap/CCTiledMap.js @@ -177,7 +177,7 @@ var TiledMap = cc.Class({ }, _tmxFile: { - default: '', + default: null, type: cc.TiledMapAsset }, /** @@ -671,6 +671,7 @@ var TiledMap = cc.Class({ var child = logicChildren[i]; var tmxLayer = child.getComponent(cc.TiledLayer); var zOrderValue = child.getSiblingIndex(); + child.setLocalZOrder(zOrderValue); if (tmxLayer) { if (tmxLayer._sgNode) { tmxLayer._sgNode.setLocalZOrder(zOrderValue);