mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge pull request #310 from jareguo/master
particle should not auto remove in editor
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user