Fix Animation component pause()

This commit is contained in:
Antriel 2018-04-13 09:58:33 +02:00
parent 9cfda8a7b0
commit b52707f79d

View file

@ -817,8 +817,11 @@ var Animation = new Class({
*/ */
update: function (timestamp, delta) update: function (timestamp, delta)
{ {
if (this.currentAnim && (this.isPlaying || !this.currentAnim.paused)) if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)
{ {
return;
}
this.accumulator += delta * this._timeScale; this.accumulator += delta * this._timeScale;
if (this._pendingStop === 1) if (this._pendingStop === 1)
@ -835,7 +838,6 @@ var Animation = new Class({
{ {
this.currentAnim.setFrame(this); this.currentAnim.setFrame(this);
} }
}
}, },
/** /**