phaser/Docs/out/Phaser.Animation.html
2013-10-01 16:15:45 +01:00

1175 lines
No EOL
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Animation</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Animation</h1>
<section>
<header>
<h2>
Animation
</h2>
<div class="class-description">Phaser.Animation</div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Animation"><span class="type-signature"></span>new Animation<span class="signature">(game, parent, name, frameData, frames, delay, looped)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
An Animation instance contains a single animation and the controls to play it.
It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type">Phaser.Game</span>
</td>
<td class="description last">A reference to the currently running game.</td>
</tr>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
<span class="param-type">Phaser.Sprite</span>
</td>
<td class="description last">A reference to the owner of this Animation.</td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">The unique name for this animation, used in playback commands.</td>
</tr>
<tr>
<td class="name"><code>frameData</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
</td>
<td class="description last">The FrameData object that contains all frames used by this Animation.</td>
</tr>
<tr>
<td class="name"><code>frames</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
|
<span class="param-type">Array.&lt;string></span>
</td>
<td class="description last">An array of numbers or strings indicating which frames to play in which order.</td>
</tr>
<tr>
<td class="name"><code>delay</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">The time between each frame of the animation, given in ms.</td>
</tr>
<tr>
<td class="name"><code>looped</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">Should this animation loop or play through once.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 22
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="Phaser.Animation.Frame.html">Frame</a></dt>
<dd></dd>
<dt><a href="Phaser.Animation.FrameData.html">FrameData</a></dt>
<dd></dd>
<dt><a href="Phaser.Animation.Parser.html">Parser</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="currentFrame"><span class="type-signature"></span>currentFrame<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>currentFrame</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Animation.Frame.html">Phaser.Animation.Frame</a></span>
</td>
<td class="description last">The currently displayed frame of the Animation.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 112
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="delay"><span class="type-signature"></span>delay<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>delay</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">The delay in ms between each frame of the Animation.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 56
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type">Phaser.Game</span>
</td>
<td class="description last">A reference to the currently running Game.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 27
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isFinished"><span class="type-signature"></span>isFinished<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isFinished</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">The finished state of the Animation. Set to true once playback completes, false during playback.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 67
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isPaused"><span class="type-signature"></span>isPaused<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isPaused</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">The paused state of the Animation.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 79
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isPlaying"><span class="type-signature"></span>isPlaying<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isPlaying</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">The playing state of the Animation. Set to false once playback completes, true during playback.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 73
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="looped"><span class="type-signature"></span>looped<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>looped</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">The loop state of the Animation.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 61
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">The user defined name given to this Animation.</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Animation.js, line 44
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Phaser.Animation.html">Animation</a></li><li><a href="Phaser.Animation.Frame.html">Frame</a></li><li><a href="Phaser.Animation.FrameData.html">FrameData</a></li><li><a href="Phaser.Animation.Parser.html">Parser</a></li><li><a href="Phaser.AnimationManager.html">AnimationManager</a></li></ul><h3>Global</h3><ul><li><a href="global.html#add">add</a></li><li><a href="global.html#addFrame">addFrame</a></li><li><a href="global.html#checkFrameName">checkFrameName</a></li><li><a href="global.html#destroy">destroy</a></li><li><a href="global.html#generateFrameNames">generateFrameNames</a></li><li><a href="global.html#getFrame">getFrame</a></li><li><a href="global.html#getFrameByName">getFrameByName</a></li><li><a href="global.html#getFrameIndexes">getFrameIndexes</a></li><li><a href="global.html#getFrameRange">getFrameRange</a></li><li><a href="global.html#getFrames">getFrames</a></li><li><a href="global.html#JSONData">JSONData</a></li><li><a href="global.html#JSONDataHash">JSONDataHash</a></li><li><a href="global.html#onComplete">onComplete</a></li><li><a href="global.html#play">play</a></li><li><a href="global.html#restart">restart</a></li><li><a href="global.html#setTrim">setTrim</a></li><li><a href="global.html#spriteSheet">spriteSheet</a></li><li><a href="global.html#stop">stop</a></li><li><a href="global.html#total">total</a></li><li><a href="global.html#update">update</a></li><li><a href="global.html#validateFrames">validateFrames</a></li><li><a href="global.html#XMLData">XMLData</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 15:44:41 GMT+0100 (BST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>