* Sets the current animation for a track, discarding any queued animations. * @param {number} trackIndex - the track index * @param {string} name - the animation name * @param {boolean} [loop=false] - If true, the animation will repeat. * @returns {TrackEntry} A track entry to allow further
(trackIndex, name, loop = false)
| 495 | * spineAlien.setAnimation(0, "death", true); |
| 496 | */ |
| 497 | setAnimation(trackIndex, name, loop = false) { |
| 498 | this.currentTrack = this.animationState.setAnimation( |
| 499 | trackIndex, |
| 500 | name, |
| 501 | loop, |
| 502 | ); |
| 503 | return this.currentTrack; |
| 504 | } |
| 505 | |
| 506 | /** |
| 507 | * Return true if the given animation name is the current running animation for the current track. |
no outgoing calls
no test coverage detected