修改stop之后setAnimation不显示的bug
This commit is contained in:
@@ -227,6 +227,7 @@ var SpineMgr = {
|
||||
this._queueCmd(id, "setAnimation", [animName, loop, track]);
|
||||
return null;
|
||||
}
|
||||
e.visible = true;
|
||||
if (!e.ready) {
|
||||
this._queueCmd(id, "setAnimation", [animName, loop, track]);
|
||||
return null;
|
||||
@@ -355,12 +356,35 @@ var SpineMgr = {
|
||||
}
|
||||
},
|
||||
|
||||
stop: function(id) {
|
||||
var e = this._entries[id];
|
||||
if (!e) return;
|
||||
e.visible = false;
|
||||
e._hideOnComplete = false;
|
||||
e._hideAfterCompletes = 0;
|
||||
delete this._pendingCmds[id];
|
||||
if (e.state) {
|
||||
e.state.clearTracks();
|
||||
}
|
||||
if (e.skeleton) {
|
||||
e.skeleton.setToSetupPose();
|
||||
}
|
||||
},
|
||||
|
||||
stopAll: function() {
|
||||
for (var id in this._entries) {
|
||||
this.stop(id);
|
||||
}
|
||||
},
|
||||
|
||||
remove: function(id) {
|
||||
delete this._entries[id];
|
||||
delete this._pendingCmds[id];
|
||||
},
|
||||
|
||||
removeAll: function() {
|
||||
this._entries = {};
|
||||
this._pendingCmds = {};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user