<p>Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>name</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The name of the animation to be played, e.g. "fire", "walk", "jump".</p></td>
</tr>
<tr>
<tdclass="name"><code>frameRate</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
null
</td>
<tdclass="description last"><p>The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.</p></td>
</tr>
<tr>
<tdclass="name"><code>loop</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
null
</td>
<tdclass="description last"><p>Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.</p></td>
<p>Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.
The currentAnim property of the AnimationManager is automatically set to the animation given.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>name</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
null
</td>
<tdclass="description last"><p>The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.</p></td>
</tr>
<tr>
<tdclass="name"><code>resetFrame</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)</p></td>