mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play
on the animation.
This commit is contained in:
parent
65a7e1b762
commit
77d5be1d8e
2 changed files with 5 additions and 8 deletions
|
@ -165,12 +165,7 @@ Calling addToWorld() would previously not check the _toRemove array, which could
|
|||
* Calling Tween.stop from inside a Tween update callback would still cause the tween onComplete event to fire (thanks @eguneys, #924)
|
||||
* Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928)
|
||||
* Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
|
||||
|
||||
|
||||
### ToDo
|
||||
|
||||
When you add an animation it over-rides the default set frame to the first frame of the animation.
|
||||
|
||||
* When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call `play` on the animation.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -159,11 +159,13 @@ Phaser.AnimationManager.prototype = {
|
|||
this.currentAnim = this._anims[name];
|
||||
this.currentFrame = this.currentAnim.currentFrame;
|
||||
|
||||
this.sprite.setFrame(this.currentFrame);
|
||||
// this.sprite.setFrame(this.currentFrame);
|
||||
|
||||
// CHECK WE STILL NEED THIS - PRETTY SURE IT DOESN'T ACTUALLY DO ANYTHING!
|
||||
if (this.sprite.__tilePattern)
|
||||
{
|
||||
this.__tilePattern = false;
|
||||
// this.__tilePattern = false;
|
||||
this.sprite.__tilePattern = false;
|
||||
this.tilingTexture = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue