Fix issues for next merging dev

This commit is contained in:
pandamicro
2018-04-16 19:44:34 +08:00
parent 14a555e0fb
commit 3ffdf16c61
8 changed files with 21 additions and 22 deletions
+8 -7
View File
@@ -179,7 +179,7 @@ var properties = {
*/
_file: {
default: null,
type: cc.ParticleAsset
type: ParticleAsset
},
file: {
get: function () {
@@ -201,7 +201,7 @@ var properties = {
}
},
animatable: false,
type: cc.ParticleAsset,
type: ParticleAsset,
tooltip: CC_DEV && 'i18n:COMPONENT.particle_system.file'
},
@@ -1096,13 +1096,17 @@ var ParticleSystem = cc.Class({
return;
}
self._plistFile = file;
self._plistFile = file.nativeUrl;
if (self._custom) {
self._initTextureWithDictionary(content);
}
else {
self._initWithDictionary(content);
}
if (file.texture) {
self.spriteFrame = new cc.SpriteFrame(file.texture);
}
});
}
},
@@ -1137,9 +1141,6 @@ var ParticleSystem = cc.Class({
cc.logID(6010);
return false;
}
else if (!content.textureImageData && file.texture) {
sgNode.texture = file.texture;
}
var imageFormat = getImageFormatByData(buffer);
if (imageFormat !== macro.ImageFormat.TIFF && imageFormat !== macro.ImageFormat.PNG) {
@@ -1262,7 +1263,7 @@ var ParticleSystem = cc.Class({
else {
this._rotationIsDir = false;
}
} else if (this._emitterMode === _ccsg.ParticleSystem.Mode.RADIUS) {
} else if (this._emitterMode === EmitterMode.RADIUS) {
// or Mode B: radius movement
this.startRadius = parseFloat(dict["maxRadius"] || 0);
this.startRadiusVar = parseFloat(dict["maxRadiusVariance"] || 0);