mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Added ignoreIfPlaying argument to Animation.Play.
This commit is contained in:
parent
44f6d9c1d2
commit
72913b63dd
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
|||
var Play = function (key, startFrame)
|
||||
var Play = function (key, ignoreIfPlaying, startFrame)
|
||||
{
|
||||
if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }
|
||||
if (startFrame === undefined) { startFrame = 0; }
|
||||
|
||||
if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
this.load(key, startFrame);
|
||||
|
||||
var anim = this.currentAnim;
|
||||
|
|
Loading…
Reference in a new issue