mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
The SpineGameObject.setAnimation
method will now use the trackIndex
parameter if ignoreIfPlaying
is set and run the check against this track index. Fix #4842
This commit is contained in:
parent
f97afe16e7
commit
a9c32d4efa
1 changed files with 2 additions and 2 deletions
|
@ -989,7 +989,7 @@ var SpineGameObject = new Class({
|
|||
* @param {integer} trackIndex - The track index to play the animation on.
|
||||
* @param {string} animationName - The string-based key of the animation to play.
|
||||
* @param {boolean} [loop=false] - Should the animation be looped when played?
|
||||
* @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.
|
||||
* @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.
|
||||
*
|
||||
* @return {spine.TrackEntry} A track entry to allow further customization of animation playback.
|
||||
*/
|
||||
|
@ -1000,7 +1000,7 @@ var SpineGameObject = new Class({
|
|||
|
||||
if (ignoreIfPlaying && this.state)
|
||||
{
|
||||
var currentTrack = this.state.getCurrent(0);
|
||||
var currentTrack = this.state.getCurrent(trackIndex);
|
||||
|
||||
if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue