* Play an animation, or resume the current animation / video. A shorthand: * call with an animation id to switch to (and start) it, or with no argument * to resume after Sprite#pause. Always clears the paused state. The * options mirror Sprite#setCurrentAnimation and the 3D *
(name, options)
| 422 | * sprite.play(); // resume |
| 423 | */ |
| 424 | play(name, options) { |
| 425 | this.animationpause = false; |
| 426 | // `name` only applies to frame animations; a video sprite just resumes |
| 427 | if (name !== undefined && !this.isVideo) { |
| 428 | this.setCurrentAnimation(name, options); |
| 429 | } |
| 430 | return this; |
| 431 | } |
| 432 | |
| 433 | /** |
| 434 | * Pause the current animation or video, freezing the current frame. Resume |
no test coverage detected