Adding more examples in.

This commit is contained in:
Richard Davey
2013-09-15 20:45:00 +01:00
parent f069107e55
commit 8c9a7c8bc7
9 changed files with 293 additions and 81 deletions
+5 -3
View File
@@ -166,21 +166,23 @@ Phaser.AnimationManager.prototype = {
* Stop animation. If a name is given that specific animation is stopped, otherwise the current one is stopped.
* Current animation will be automatically set to the stopped one.
*/
stop: function (name) {
stop: function (name, resetFrame) {
if (typeof resetFrame == 'undefined') { resetFrame = false; }
if (typeof name == 'string')
{
if (this._anims[name])
{
this.currentAnim = this._anims[name];
this.currentAnim.stop();
this.currentAnim.stop(resetFrame);
}
}
else
{
if (this.currentAnim)
{
this.currentAnim.stop();
this.currentAnim.stop(resetFrame);
}
}