mirror of
https://github.com/wassname/phaser.git
synced 2026-08-13 12:30:11 +08:00
1.0.1 release - fixes issues in tile map collision, additional Animation stop checks and updated package license.
This commit is contained in:
@@ -163,15 +163,25 @@ Phaser.AnimationManager.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop animation by name.
|
||||
* 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) {
|
||||
|
||||
if (this._anims[name])
|
||||
if (typeof name == 'string')
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.stop();
|
||||
if (this._anims[name])
|
||||
{
|
||||
this.currentAnim = this._anims[name];
|
||||
this.currentAnim.stop();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.currentAnim)
|
||||
{
|
||||
this.currentAnim.stop();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user