Skip to content

Commit

Permalink
Merge pull request cocos#2699 from knoxHuang/master
Browse files Browse the repository at this point in the history
fix fireball/issues/7316
  • Loading branch information
jareguo authored May 17, 2018
2 parents 86acc1b + 820c269 commit 02d1c10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions cocos2d/core/load-pipeline/pack-downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ module.exports = {
},

_doPreload (packUuid, packJson) {
var unpacker = globalUnpackers[packUuid];
if (!unpacker) {
unpacker = globalUnpackers[packUuid] = new JsonUnpacker();
var unpackerData = globalUnpackers[packUuid];
if (!unpackerData) {
unpackerData = globalUnpackers[packUuid] = new UnpackerData();
unpackerData.state = PackState.Downloading;
}
if (unpacker.state !== PackState.Loaded) {
unpacker.read(packIndices[packUuid], packJson);
unpacker.state = PackState.Loaded;
if (unpackerData.state !== PackState.Loaded) {
unpackerData.unpacker = new Unpackers.JsonUnpacker();
unpackerData.unpacker.load(packIndices[packUuid], packJson);
unpackerData.state = PackState.Loaded;
}
},

Expand Down
1 change: 1 addition & 0 deletions cocos2d/particle/CCSGParticleSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

var PNGReader = require('./CCPNGReader');
var tiffReader = require('./CCTIFFReader');
require('../core/platform/CCSAXParser.js');
require('../compression/ZipUtils');

// ideas taken from:
Expand Down
3 changes: 1 addition & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"name": "ParticleSystem",
"entries": [
"./cocos2d/particle/CCParticleSystem.js",
"./cocos2d/particle/CCParticleAsset.js",
"./cocos2d/core/platform/CCSAXParser.js"
"./cocos2d/particle/CCParticleAsset.js"
]
},
{
Expand Down

0 comments on commit 02d1c10

Please sign in to comment.