mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 02:02:41 +08:00
@@ -112,12 +112,8 @@ var Animation = cc.Class({
|
||||
get: function () {
|
||||
return this._currentClip;
|
||||
},
|
||||
set: function (value, force) {
|
||||
set: function (value) {
|
||||
this._currentClip = value;
|
||||
|
||||
if (CC_EDITOR && force && value) {
|
||||
this._updateClip(value);
|
||||
}
|
||||
},
|
||||
type: AnimationClip,
|
||||
visible: false
|
||||
@@ -503,7 +499,7 @@ var Animation = cc.Class({
|
||||
}
|
||||
},
|
||||
|
||||
_updateClip: (CC_TEST || CC_EDITOR) && function (clip, clipName) {
|
||||
_updateClip: (CC_TEST || CC_EDITOR) && function (clip, clipName, notReload) {
|
||||
this._init();
|
||||
|
||||
clipName = clipName || clip.name;
|
||||
@@ -535,8 +531,10 @@ var Animation = cc.Class({
|
||||
oldState._name = clipName;
|
||||
}
|
||||
|
||||
oldState._clip = clip;
|
||||
this._animator._reloadClip(oldState);
|
||||
if (!notReload) {
|
||||
oldState._clip = clip;
|
||||
this._animator._reloadClip(oldState);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user