mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Fix Animation component pause()
This commit is contained in:
parent
9cfda8a7b0
commit
b52707f79d
1 changed files with 15 additions and 13 deletions
|
@ -817,24 +817,26 @@ var Animation = new Class({
|
|||
*/
|
||||
update: function (timestamp, delta)
|
||||
{
|
||||
if (this.currentAnim && (this.isPlaying || !this.currentAnim.paused))
|
||||
if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)
|
||||
{
|
||||
this.accumulator += delta * this._timeScale;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._pendingStop === 1)
|
||||
this.accumulator += delta * this._timeScale;
|
||||
|
||||
if (this._pendingStop === 1)
|
||||
{
|
||||
this._pendingStopValue -= delta;
|
||||
|
||||
if (this._pendingStopValue <= 0)
|
||||
{
|
||||
this._pendingStopValue -= delta;
|
||||
|
||||
if (this._pendingStopValue <= 0)
|
||||
{
|
||||
return this.currentAnim.completeAnimation(this);
|
||||
}
|
||||
return this.currentAnim.completeAnimation(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.accumulator >= this.nextTick)
|
||||
{
|
||||
this.currentAnim.setFrame(this);
|
||||
}
|
||||
if (this.accumulator >= this.nextTick)
|
||||
{
|
||||
this.currentAnim.setFrame(this);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue