Merge pull request #310 from jareguo/master

particle should not auto remove in editor
This commit is contained in:
Jare Guo
2016-02-01 17:39:03 +08:00
+10 -5
View File
@@ -106,10 +106,10 @@ var properties = {
else {
this._applyFile();
}
cc.engine.repaintInEditMode();
//if (CC_EDITOR) {
if (CC_EDITOR) {
cc.engine.repaintInEditMode();
// self.preview = self.preview;
//}
}
}
},
animatable: false
@@ -743,7 +743,9 @@ var ParticleSystem = cc.Class({
}
sgNode.setPosition(0, 0);
sgNode.autoRemoveOnFinish = self._autoRemoveOnFinish;
if (!CC_EDITOR || cc.engine.isPlaying) {
self._applyAutoRemove();
}
//
@@ -770,7 +772,10 @@ var ParticleSystem = cc.Class({
if (!active) {
sgNode.stopSystem();
}
sgNode.autoRemoveOnFinish = this._autoRemoveOnFinish;
if (!CC_EDITOR || cc.engine.isPlaying) {
this._applyAutoRemove();
}
},
_applyAutoRemove: function () {