refine code

This commit is contained in:
2youyouo2
2016-08-10 14:06:16 +08:00
parent 4e2da16103
commit e04b69e55d
+4 -3
View File
@@ -169,12 +169,13 @@ var Animation = cc.Class({
onEnable: function () {
if (!CC_EDITOR && this.playOnLoad && this._defaultClip) {
this.playOnLoad = false;
var state = this.getAnimationState(this._defaultClip.name);
this._animator.playState(state);
}
this.resume();
else {
this.resume();
}
},
onDisable: function () {