Skip to content

Commit

Permalink
fixed issue #6 (now after scene transition, old sprites restart their…
Browse files Browse the repository at this point in the history
… animation)
  • Loading branch information
D0NM committed Apr 16, 2014
1 parent 0ce9b02 commit 08845c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/animatedSprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,10 @@ waw.AnimatedSprite = cc.Sprite.extend({
this.currentAnimationKey = animationKey;
this.stopAllActions();
this.runAction(this.animations[this.currentAnimationKey]);
},
onEnter: function () {
this._super();
this.stopAllActions();
this.runAction(this.animations[this.currentAnimationKey]);
}
});

0 comments on commit 08845c5

Please sign in to comment.