mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
refine code
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user