mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
More docs coming on.
This commit is contained in:
parent
a38ad2d1a9
commit
ca113b85aa
80 changed files with 10121 additions and 4763 deletions
|
@ -3,7 +3,7 @@
|
|||
"allowUnknownTags": true
|
||||
},
|
||||
"source": {
|
||||
"include": [ "../src/Phaser.js", "../src/animation/Animation.js" ],
|
||||
"include": [ "../src/Phaser.js", "../src/animation/", "../src/core/Camera.js", "../src/core/Game.js", "../src/core/Group.js" ],
|
||||
"exclude": [],
|
||||
"includePattern": ".+\\.js(doc)?$",
|
||||
"excludePattern": "(^|\\/|\\\\)_"
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Phaser.Game</span>
|
||||
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@
|
|||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Phaser.Animation.FrameData</span>
|
||||
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
|
||||
|
||||
|
||||
|
||||
|
@ -360,7 +360,7 @@
|
|||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Phaser.Animation.Frame</span>
|
||||
<span class="param-type"><a href="Phaser.Animation.Frame.html">Phaser.Animation.Frame</a></span>
|
||||
|
||||
|
||||
|
||||
|
@ -562,7 +562,7 @@
|
|||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Phaser.Game</span>
|
||||
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
|
@ -1147,13 +1147,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</a></li></ul>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:09:01 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
|
@ -120,13 +120,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</a></li></ul>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:09:01 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
1345
Docs/out/Camera-Phaser.Camera.html
Normal file
1345
Docs/out/Camera-Phaser.Camera.html
Normal file
File diff suppressed because it is too large
Load diff
135
Docs/out/Camera.html
Normal file
135
Docs/out/Camera.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: Camera</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">Module: Camera</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
||||
|
||||
Camera
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-author">Author:</dt>
|
||||
<dd class="tag-author">
|
||||
<ul>
|
||||
<li><a href="mailto:rich@photonstorm.com">Richard Davey</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-copyright">Copyright:</dt>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li>2013 Photon Storm Ltd.</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-license">License:</dt>
|
||||
<dd class="tag-license"><ul class="dummy"><li><a href="https://github.com/photonstorm/phaser/blob/master/license.txt">MIT License</a></li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Camera.js, line 1
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
3542
Docs/out/Game-Phaser.Game.html
Normal file
3542
Docs/out/Game-Phaser.Game.html
Normal file
File diff suppressed because it is too large
Load diff
135
Docs/out/Game.html
Normal file
135
Docs/out/Game.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: Game</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">Module: Game</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
||||
|
||||
Game
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-author">Author:</dt>
|
||||
<dd class="tag-author">
|
||||
<ul>
|
||||
<li><a href="mailto:rich@photonstorm.com">Richard Davey</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-copyright">Copyright:</dt>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li>2013 Photon Storm Ltd.</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-license">License:</dt>
|
||||
<dd class="tag-license"><ul class="dummy"><li><a href="https://github.com/photonstorm/phaser/blob/master/license.txt">MIT License</a></li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Game.js, line 1
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
680
Docs/out/Group-Phaser.Group.html
Normal file
680
Docs/out/Group-Phaser.Group.html
Normal file
|
@ -0,0 +1,680 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Class: Group</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: Group</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
Group
|
||||
</h2>
|
||||
|
||||
<div class="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>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="Group"><span class="type-signature"></span>new Group<span class="signature">(game, parent, name, useStage)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
Phaser Group constructor.
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></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">Description</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Description.</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>useStage</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">bool</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Description.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Group.js, line 19
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="exists"><span class="type-signature"></span>exists<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>exists</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">bool</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Description.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table></dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-default">Default Value:</dt>
|
||||
<dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Group.js, line 73
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></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>
|
||||
core/Group.js, line 31
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Description.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table></dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Group.js, line 36
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="type"><span class="type-signature"></span>type<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>type</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Description</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">Description.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table></dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Group.js, line 67
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
135
Docs/out/Group.html
Normal file
135
Docs/out/Group.html
Normal file
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>JSDoc: Module: Group</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">Module: Group</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
<h2>
|
||||
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
||||
|
||||
Group
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-author">Author:</dt>
|
||||
<dd class="tag-author">
|
||||
<ul>
|
||||
<li><a href="mailto:rich@photonstorm.com">Richard Davey</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-copyright">Copyright:</dt>
|
||||
<dd class="tag-copyright"><ul class="dummy"><li>2013 Photon Storm Ltd.</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-license">License:</dt>
|
||||
<dd class="tag-license"><ul class="dummy"><li><a href="https://github.com/photonstorm/phaser/blob/master/license.txt">MIT License</a></li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
core/Group.js, line 1
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
<script src="scripts/linenumber.js"> </script>
|
||||
</body>
|
||||
</html>
|
|
@ -2253,6 +2253,265 @@
|
|||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="setTrim"><span class="type-signature"><static> </span>setTrim<span class="signature">(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||
</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>trimmed</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">bool</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">If this frame was trimmed or not.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>actualWidth</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The width of the frame before being trimmed.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>actualHeight</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The height of the frame before being trimmed.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>destX</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The destination X position of the trimmed frame for display.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>destY</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The destination Y position of the trimmed frame for display.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>destWidth</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The destination width of the trimmed frame for display.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>destHeight</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The destination height of the trimmed frame for display.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
animation/Frame.js, line 129
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2267,13 +2526,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:05:08 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -121,6 +121,864 @@
|
|||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="JSONData"><span class="type-signature"><static> </span>JSONData<span class="signature">(game, json, cacheKey)</span><span class="type-signature"> → {<a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
Parse the JSON data and extract the animation frame data from it.
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">A reference to the currently running game.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>json</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The JSON data from the Texture Atlas. Must be in Array format.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>cacheKey</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The Game.Cache asset key of the texture image.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
animation/Parser.js, line 97
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
A FrameData object containing the parsed frames.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="JSONDataHash"><span class="type-signature"><static> </span>JSONDataHash<span class="signature">(game, json, cacheKey)</span><span class="type-signature"> → {<a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
Parse the JSON data and extract the animation frame data from it.
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">A reference to the currently running game.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>json</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The JSON data from the Texture Atlas. Must be in JSON Hash format.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>cacheKey</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The Game.Cache asset key of the texture image.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
animation/Parser.js, line 169
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
A FrameData object containing the parsed frames.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="spriteSheet"><span class="type-signature"><static> </span>spriteSheet<span class="signature">(game, key, frameWidth, frameHeight, <span class="optional">frameMax</span>)</span><span class="type-signature"> → {<a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
Parse a Sprite Sheet and extract the animation frame data from it.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
<th>Argument</th>
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>game</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">A reference to the currently running game.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>key</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">The Game.Cache asset key of the Sprite Sheet image.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>frameWidth</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">The fixed width of each frame of the animation.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>frameHeight</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">The fixed height of each frame of the animation.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>frameMax</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
-1
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
animation/Parser.js, line 15
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
A FrameData object containing the parsed frames.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>
|
||||
<h4 class="name" id="XMLData"><span class="type-signature"><static> </span>XMLData<span class="signature">(game, xml, cacheKey)</span><span class="type-signature"> → {<a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a>}</span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
<div class="description">
|
||||
Parse the XML data and extract the animation frame data from it.
|
||||
</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"><a href="Phaser.Game.html">Phaser.Game</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">A reference to the currently running game.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>xml</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Object</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The XML data from the Texture Atlas. Must be in Starling XML format.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>cacheKey</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">The Game.Cache asset key of the texture image.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
animation/Parser.js, line 244
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
A FrameData object containing the parsed frames.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type"><a href="Phaser.Animation.FrameData.html">Phaser.Animation.FrameData</a></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -135,13 +993,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:05:08 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -98,6 +98,13 @@
|
|||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Classes</h3>
|
||||
|
||||
<dl>
|
||||
<dt><a href="Phaser.AnimationManager.html">AnimationManager</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -118,13 +125,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</a></li></ul>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:09:01 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
4237
Docs/out/global.html
4237
Docs/out/global.html
File diff suppressed because it is too large
Load diff
|
@ -48,13 +48,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</a></li></ul>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:09:01 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
|
@ -105,13 +105,13 @@
|
|||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li></ul><h3>Classes</h3><ul><li><a href="Animation-Phaser.Animation.html">Animation</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</a></li></ul>
|
||||
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-Phaser.html">Phaser</a></li><li><a href="Animation.html">Animation</a></li><li><a href="Camera.html">Camera</a></li><li><a href="Game.html">Game</a></li><li><a href="Group.html">Group</a></li></ul><h3>Classes</h3><ul><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><li><a href="Animation-Phaser.Animation.html">Animation</a></li><li><a href="Camera-Phaser.Camera.html">Camera</a></li><li><a href="Game-Phaser.Game.html">Game</a></li><li><a href="Group-Phaser.Group.html">Group</a></li></ul><h3>Namespaces</h3><ul><li><a href="Phaser.html">Phaser</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 16:09:01 GMT+0100 (BST)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
|
|
@ -65,6 +65,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* This is called automatically when a new Sprite is created.
|
||||
*
|
||||
* @method loadFrameData
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @private
|
||||
* @param {Phaser.Animation.FrameData} frameData - The FrameData set to load.
|
||||
*/
|
||||
|
@ -80,6 +81,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* Animations added in this way are played back with the play function.
|
||||
*
|
||||
* @method add
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
|
||||
* @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
|
||||
* @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second.
|
||||
|
@ -125,6 +127,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* Check whether the frames in the given array are valid and exist.
|
||||
*
|
||||
* @method validateFrames
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {Array} frames - An array of frames to be validated.
|
||||
* @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false)
|
||||
* @return {boolean} True if all given Frames are valid, otherwise false.
|
||||
|
@ -160,6 +163,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* 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.
|
||||
*
|
||||
* @method play
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
|
||||
* @param {number} [frameRate=null] - 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.
|
||||
* @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
|
||||
|
@ -190,6 +194,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* The currentAnim property of the AnimationManager is automatically set to the animation given.
|
||||
*
|
||||
* @method stop
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
|
||||
* @param {boolean} [resetFrame=false] - 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)
|
||||
*/
|
||||
|
@ -219,6 +224,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.
|
||||
*
|
||||
* @method update
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @protected
|
||||
* @return {boolean} True if a new animation frame has been set, otherwise false.
|
||||
*/
|
||||
|
@ -244,6 +250,7 @@ Phaser.AnimationManager.prototype = {
|
|||
* Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation.
|
||||
*
|
||||
* @method destroy
|
||||
* @memberof Phaser.AnimationManager
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
|
@ -258,6 +265,7 @@ Phaser.AnimationManager.prototype = {
|
|||
};
|
||||
|
||||
/**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", {
|
||||
|
@ -269,6 +277,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", {
|
|||
});
|
||||
|
||||
/**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @return {number} Returns the total number of frames in the loaded FrameData, or -1 if no FrameData is loaded.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", {
|
||||
|
@ -288,8 +297,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", {
|
|||
});
|
||||
|
||||
/**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @return {boolean} Returns the paused state of the current animation.
|
||||
*//**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {boolean} value - Sets the paused state of the current animation.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "paused", {
|
||||
|
@ -309,8 +320,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", {
|
|||
});
|
||||
|
||||
/**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @return {number} Returns the index of the current frame.
|
||||
*//**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {number} value - Sets the current frame on the Sprite and updates the texture cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
||||
|
@ -339,8 +352,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
|||
});
|
||||
|
||||
/**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @return {string} Returns the name of the current frame if it has one.
|
||||
*//**
|
||||
* @memberof Phaser.AnimationManager
|
||||
* @param {string} value - Sets the current frame on the Sprite and updates the texture cache for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", {
|
||||
|
|
|
@ -71,7 +71,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) {
|
|||
this.distance = Phaser.Math.distance(0, 0, width, height);
|
||||
|
||||
/**
|
||||
* @property {bool} rotated - Rotated? (not yet implemented)
|
||||
* @property {boolean} rotated - Rotated? (not yet implemented)
|
||||
* @default
|
||||
*/
|
||||
this.rotated = false;
|
||||
|
@ -83,7 +83,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) {
|
|||
this.rotationDirection = 'cw';
|
||||
|
||||
/**
|
||||
* @property {bool} trimmed - Was it trimmed when packed?
|
||||
* @property {boolean} trimmed - Was it trimmed when packed?
|
||||
* @default
|
||||
*/
|
||||
this.trimmed = false;
|
||||
|
@ -130,7 +130,8 @@ Phaser.Animation.Frame.prototype = {
|
|||
* If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||
*
|
||||
* @method setTrim
|
||||
* @param {bool} trimmed - If this frame was trimmed or not.
|
||||
* @memberof Phaser.Animation.Frame
|
||||
* @param {boolean} trimmed - If this frame was trimmed or not.
|
||||
* @param {number} actualWidth - The width of the frame before being trimmed.
|
||||
* @param {number} actualHeight - The height of the frame before being trimmed.
|
||||
* @param {number} destX - The destination X position of the trimmed frame for display.
|
||||
|
|
|
@ -34,6 +34,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.
|
||||
*
|
||||
* @method addFrame
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set.
|
||||
* @return {Phaser.Animation.Frame} The frame that was just added.
|
||||
*/
|
||||
|
@ -56,6 +57,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* Get a Frame by its numerical index.
|
||||
*
|
||||
* @method getFrame
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {number} index - The index of the frame you want to get.
|
||||
* @return {Phaser.Animation.Frame} The frame, if found.
|
||||
*/
|
||||
|
@ -74,6 +76,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* Get a Frame by its frame name.
|
||||
*
|
||||
* @method getFrameByName
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {string} name - The name of the frame you want to get.
|
||||
* @return {Phaser.Animation.Frame} The frame, if found.
|
||||
*/
|
||||
|
@ -92,6 +95,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* Check if there is a Frame with the given name.
|
||||
*
|
||||
* @method checkFrameName
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {string} name - The name of the frame you want to check.
|
||||
* @return {boolean} True if the frame is found, otherwise false.
|
||||
*/
|
||||
|
@ -110,6 +114,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* Returns a range of frames based on the given start and end frame indexes and returns them in an Array.
|
||||
*
|
||||
* @method getFrameRange
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {number} start - The starting frame index.
|
||||
* @param {number} end - The ending frame index.
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
|
@ -133,6 +138,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* The frames are returned in the output array, or if none is provided in a new Array object.
|
||||
*
|
||||
* @method getFrames
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false)
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
|
@ -180,6 +186,7 @@ Phaser.Animation.FrameData.prototype = {
|
|||
* The frames indexes are returned in the output array, or if none is provided in a new Array object.
|
||||
*
|
||||
* @method getFrameIndexes
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
|
||||
* @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false)
|
||||
* @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created.
|
||||
|
@ -227,7 +234,8 @@ Object.defineProperty(Phaser.Animation.FrameData.prototype, "total", {
|
|||
* Returns the total number of frames in this FrameData set.
|
||||
*
|
||||
* @method total
|
||||
* @return {Number} The total number of frames in this FrameData set.
|
||||
* @memberof Phaser.Animation.FrameData
|
||||
* @return {number} The total number of frames in this FrameData set.
|
||||
*/
|
||||
get: function () {
|
||||
return this._frames.length;
|
||||
|
|
|
@ -16,6 +16,7 @@ Phaser.Animation.Parser = {
|
|||
* Parse a Sprite Sheet and extract the animation frame data from it.
|
||||
*
|
||||
* @method spriteSheet
|
||||
* @memberof Phaser.Animation.Parser
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {string} key - The Game.Cache asset key of the Sprite Sheet image.
|
||||
* @param {number} frameWidth - The fixed width of each frame of the animation.
|
||||
|
@ -97,6 +98,7 @@ Phaser.Animation.Parser = {
|
|||
* Parse the JSON data and extract the animation frame data from it.
|
||||
*
|
||||
* @method JSONData
|
||||
* @memberof Phaser.Animation.Parser
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
|
@ -168,6 +170,7 @@ Phaser.Animation.Parser = {
|
|||
* Parse the JSON data and extract the animation frame data from it.
|
||||
*
|
||||
* @method JSONDataHash
|
||||
* @memberof Phaser.Animation.Parser
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
|
@ -242,6 +245,7 @@ Phaser.Animation.Parser = {
|
|||
* Parse the XML data and extract the animation frame data from it.
|
||||
*
|
||||
* @method XMLData
|
||||
* @memberof Phaser.Animation.Parser
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format.
|
||||
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
|
||||
|
|
|
@ -58,13 +58,13 @@ Phaser.Camera = function (game, id, x, y, width, height) {
|
|||
this.deadzone = null;
|
||||
|
||||
/**
|
||||
* @property {bool} visible - Whether this camera is visible or not.
|
||||
* @property {boolean} visible - Whether this camera is visible or not.
|
||||
* @default
|
||||
*/
|
||||
this.visible = true;
|
||||
|
||||
/**
|
||||
* @property {bool} atLimit - Whether this camera is flush with the World Bounds or not.
|
||||
* @property {boolean} atLimit - Whether this camera is flush with the World Bounds or not.
|
||||
*/
|
||||
this.atLimit = { x: false, y: false };
|
||||
|
||||
|
@ -93,6 +93,7 @@ Phaser.Camera.prototype = {
|
|||
/**
|
||||
* Tells this camera which sprite to follow.
|
||||
* @method follow
|
||||
* @memberOf Phaser.Camera
|
||||
* @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything.
|
||||
* @param {number} [style] Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow().
|
||||
*/
|
||||
|
@ -133,6 +134,7 @@ Phaser.Camera.prototype = {
|
|||
/**
|
||||
* Move the camera focus to a location instantly.
|
||||
* @method focusOnXY
|
||||
* @memberOf Phaser.Camera
|
||||
* @param {number} x - X position.
|
||||
* @param {number} y - Y position.
|
||||
*/
|
||||
|
@ -146,6 +148,7 @@ Phaser.Camera.prototype = {
|
|||
/**
|
||||
* Update focusing and scrolling.
|
||||
* @method update
|
||||
* @memberOf Phaser.Camera
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
|
@ -196,6 +199,7 @@ Phaser.Camera.prototype = {
|
|||
/**
|
||||
* Method called to ensure the camera doesn't venture outside of the game world.
|
||||
* @method checkWorldBounds
|
||||
* @memberOf Phaser.Camera
|
||||
*/
|
||||
checkWorldBounds: function () {
|
||||
|
||||
|
@ -236,6 +240,7 @@ Phaser.Camera.prototype = {
|
|||
* without having to use game.camera.x and game.camera.y.
|
||||
*
|
||||
* @method setPosition
|
||||
* @memberOf Phaser.Camera
|
||||
* @param {number} x - X position.
|
||||
* @param {number} y - Y position.
|
||||
*/
|
||||
|
@ -251,6 +256,7 @@ Phaser.Camera.prototype = {
|
|||
* Sets the size of the view rectangle given the width and height in parameters.
|
||||
*
|
||||
* @method setSize
|
||||
* @memberOf Phaser.Camera
|
||||
* @param {number} width - The desired width.
|
||||
* @param {number} height - The desired height.
|
||||
*/
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* @param {number} renderer -Which renderer to use (canvas or webgl)
|
||||
* @param {HTMLElement} parent -The Games DOM parent.
|
||||
* @param {Description} state - Description.
|
||||
* @param {bool} transparent - Use a transparent canvas background or not.
|
||||
* @param {bool} antialias - Anti-alias graphics.
|
||||
* @param {boolean} transparent - Use a transparent canvas background or not.
|
||||
* @param {boolean} antialias - Anti-alias graphics.
|
||||
*/
|
||||
Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) {
|
||||
|
||||
|
@ -56,12 +56,12 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
|||
this.height = height;
|
||||
|
||||
/**
|
||||
* @property {bool} transparent - Use a transparent canvas background or not.
|
||||
* @property {boolean} transparent - Use a transparent canvas background or not.
|
||||
*/
|
||||
this.transparent = transparent;
|
||||
|
||||
/**
|
||||
* @property {bool} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality).
|
||||
* @property {boolean} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality).
|
||||
*/
|
||||
this.antialias = antialias;
|
||||
|
||||
|
@ -77,7 +77,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
|||
this.state = new Phaser.StateManager(this, state);
|
||||
|
||||
/**
|
||||
* @property {bool} _paused - Is game paused?
|
||||
* @property {boolean} _paused - Is game paused?
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -89,20 +89,20 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
|||
this.renderType = renderer;
|
||||
|
||||
/**
|
||||
* @property {bool} _loadComplete - Whether load complete loading or not.
|
||||
* @property {boolean} _loadComplete - Whether load complete loading or not.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._loadComplete = false;
|
||||
|
||||
/**
|
||||
* @property {bool} isBooted - Whether the game engine is booted, aka available.
|
||||
* @property {boolean} isBooted - Whether the game engine is booted, aka available.
|
||||
* @default
|
||||
*/
|
||||
this.isBooted = false;
|
||||
|
||||
/**
|
||||
* @property {bool} id -Is game running or paused?
|
||||
* @property {boolean} id -Is game running or paused?
|
||||
* @default
|
||||
*/
|
||||
this.isRunning = false;
|
||||
|
@ -253,6 +253,7 @@ Phaser.Game.prototype = {
|
|||
* Initialize engine sub modules and start the game.
|
||||
*
|
||||
* @method boot
|
||||
* @memberOf Phaser.Game
|
||||
*/
|
||||
boot: function () {
|
||||
|
||||
|
@ -333,6 +334,7 @@ Phaser.Game.prototype = {
|
|||
* Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.
|
||||
*
|
||||
* @method setUpRenderer
|
||||
* @memberOf Phaser.Game
|
||||
*/
|
||||
setUpRenderer: function () {
|
||||
|
||||
|
@ -369,6 +371,7 @@ Phaser.Game.prototype = {
|
|||
* Called when the load has finished, after preload was run.
|
||||
*
|
||||
* @method loadComplete
|
||||
* @memberOf Phaser.Game
|
||||
*/
|
||||
loadComplete: function () {
|
||||
|
||||
|
@ -382,6 +385,7 @@ Phaser.Game.prototype = {
|
|||
* The core game loop.
|
||||
*
|
||||
* @method update
|
||||
* @memberOf Phaser.Game
|
||||
* @param {number} time - The current time as provided by RequestAnimationFrame.
|
||||
*/
|
||||
update: function (time) {
|
||||
|
@ -416,6 +420,7 @@ Phaser.Game.prototype = {
|
|||
* Nuke the entire game from orbit
|
||||
*
|
||||
* @method destroy
|
||||
* @memberOf Phaser.Game
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
/**
|
||||
* Phaser Group constructor.
|
||||
* @class Phaser.Group
|
||||
* @classdesc 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.
|
||||
* @classdesc A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||
* @param {Description} parent - Description.
|
||||
* @param {string} name - The unique name for this animation, used in playback commands.
|
||||
* @param {bool} useStage - Description.
|
||||
* @param {boolean} useStage - Description.
|
||||
*/
|
||||
Phaser.Group = function (game, parent, name, useStage) {
|
||||
|
||||
|
@ -67,7 +66,7 @@ Phaser.Group = function (game, parent, name, useStage) {
|
|||
this.type = Phaser.GROUP;
|
||||
|
||||
/**
|
||||
* @property {bool} exists - Description.
|
||||
* @property {boolean} exists - Description.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
@ -87,6 +86,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method add
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
* @return {Description} Description.
|
||||
*/
|
||||
|
@ -112,6 +112,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method addAt
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
* @param {Description} index - Description.
|
||||
* @return {Description} Description.
|
||||
|
@ -138,6 +139,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method getAt
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} index - Description.
|
||||
* @return {Description} Description.
|
||||
*/
|
||||
|
@ -151,6 +153,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method create
|
||||
* @memberOf Phaser.Group
|
||||
* @param {number} x - Description.
|
||||
* @param {number} y - Description.
|
||||
* @param {string} key - Description.
|
||||
|
@ -182,9 +185,10 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method swap
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child1 - Description.
|
||||
* @param {Description} child2 - Description.
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
swap: function (child1, child2) {
|
||||
|
||||
|
@ -310,6 +314,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method bringToTop
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
* @return {Description} Description.
|
||||
*/
|
||||
|
@ -329,6 +334,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method getIndex
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
* @return {Description} Description.
|
||||
*/
|
||||
|
@ -342,6 +348,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method replace
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} oldChild - Description.
|
||||
* @param {Description} newChild - Description.
|
||||
*/
|
||||
|
@ -373,6 +380,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method setProperty
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
* @param {array} key - An array of values that will be set.
|
||||
* @param {Description} value - Description.
|
||||
|
@ -436,6 +444,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method setAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} key - Description.
|
||||
* @param {Description} value - Description.
|
||||
* @param {Description} checkAlive - Description.
|
||||
|
@ -474,6 +483,7 @@ Phaser.Group.prototype = {
|
|||
* Group.addAll('x', 10) will add 10 to the child.x value.
|
||||
*
|
||||
* @method addAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'.
|
||||
* @param {number} amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.
|
||||
* @param {boolean} checkAlive - If true the property will only be changed if the child is alive.
|
||||
|
@ -490,6 +500,7 @@ Phaser.Group.prototype = {
|
|||
* Group.subAll('x', 10) will minus 10 from the child.x value.
|
||||
*
|
||||
* @method subAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'.
|
||||
* @param {number} amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.
|
||||
* @param {boolean} checkAlive - If true the property will only be changed if the child is alive.
|
||||
|
@ -506,6 +517,7 @@ Phaser.Group.prototype = {
|
|||
* Group.multiplyAll('x', 2) will x2 the child.x value.
|
||||
*
|
||||
* @method multiplyAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'.
|
||||
* @param {number} amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.
|
||||
* @param {boolean} checkAlive - If true the property will only be changed if the child is alive.
|
||||
|
@ -522,6 +534,7 @@ Phaser.Group.prototype = {
|
|||
* Group.divideAll('x', 2) will half the child.x value.
|
||||
*
|
||||
* @method divideAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'.
|
||||
* @param {number} amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.
|
||||
* @param {boolean} checkAlive - If true the property will only be changed if the child is alive.
|
||||
|
@ -538,6 +551,7 @@ Phaser.Group.prototype = {
|
|||
* After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.
|
||||
*
|
||||
* @method callAllExists
|
||||
* @memberOf Phaser.Group
|
||||
* @param {function} callback - The function that exists on the children that will be called.
|
||||
* @param {boolean} existsValue - Only children with exists=existsValue will be called.
|
||||
* @param {...*} parameter - Additional parameters that will be passed to the callback.
|
||||
|
@ -570,6 +584,7 @@ Phaser.Group.prototype = {
|
|||
* After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child.
|
||||
*
|
||||
* @method callAll
|
||||
* @memberOf Phaser.Group
|
||||
* @param {function} callback - The function that exists on the children that will be called.
|
||||
* @param {...*} parameter - Additional parameters that will be passed to the callback.
|
||||
*/
|
||||
|
@ -601,9 +616,10 @@ Phaser.Group.prototype = {
|
|||
* After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child.
|
||||
*
|
||||
* @method forEach
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} callback - Description.
|
||||
* @param {Description} callbackContext - Description.
|
||||
* @param {bool} checkExists - Description.
|
||||
* @param {boolean} checkExists - Description.
|
||||
*/
|
||||
forEach: function (callback, callbackContext, checkExists) {
|
||||
|
||||
|
@ -639,6 +655,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method forEachAlive
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} callback - Description.
|
||||
* @param {Description} callbackContext - Description.
|
||||
*/
|
||||
|
@ -671,6 +688,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method forEachDead
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} callback - Description.
|
||||
* @param {Description} callbackContext - Description.
|
||||
*/
|
||||
|
@ -702,6 +720,7 @@ Phaser.Group.prototype = {
|
|||
* Call this function to retrieve the first object with exists == (the given state) in the group.
|
||||
*
|
||||
* @method getFirstExists
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} state - Description.
|
||||
* @return {Any} The first child, or null if none found.
|
||||
*/
|
||||
|
@ -737,6 +756,7 @@ Phaser.Group.prototype = {
|
|||
* This is handy for checking if everything's wiped out, or choosing a squad leader, etc.
|
||||
*
|
||||
* @method getFirstAlive
|
||||
* @memberOf Phaser.Group
|
||||
* @return {Any} The first alive child, or null if none found.
|
||||
*/
|
||||
getFirstAlive: function () {
|
||||
|
@ -766,6 +786,7 @@ Phaser.Group.prototype = {
|
|||
* This is handy for checking if everything's wiped out, or choosing a squad leader, etc.
|
||||
*
|
||||
* @method getFirstDead
|
||||
* @memberOf Phaser.Group
|
||||
* @return {Any} The first dead child, or null if none found.
|
||||
*/
|
||||
getFirstDead: function () {
|
||||
|
@ -794,6 +815,7 @@ Phaser.Group.prototype = {
|
|||
* Call this function to find out how many members of the group are alive.
|
||||
*
|
||||
* @method countLiving
|
||||
* @memberOf Phaser.Group
|
||||
* @return {number} The number of children flagged as alive. Returns -1 if Group is empty.
|
||||
*/
|
||||
countLiving: function () {
|
||||
|
@ -824,6 +846,7 @@ Phaser.Group.prototype = {
|
|||
* Call this function to find out how many members of the group are dead.
|
||||
*
|
||||
* @method countDead
|
||||
* @memberOf Phaser.Group
|
||||
* @return {number} The number of children flagged as dead. Returns -1 if Group is empty.
|
||||
*/
|
||||
countDead: function () {
|
||||
|
@ -853,6 +876,8 @@ Phaser.Group.prototype = {
|
|||
/**
|
||||
* Returns a member at random from the group.
|
||||
*
|
||||
* @method getRandom
|
||||
* @memberOf Phaser.Group
|
||||
* @param {number} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array.
|
||||
* @param {number} length - Optional restriction on the number of values you want to randomly select from.
|
||||
* @return {Any} A random child of this Group.
|
||||
|
@ -875,6 +900,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method remove
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} child - Description.
|
||||
*/
|
||||
remove: function (child) {
|
||||
|
@ -889,6 +915,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method removeAll
|
||||
* @memberOf Phaser.Group
|
||||
*/
|
||||
removeAll: function () {
|
||||
|
||||
|
@ -913,6 +940,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method removeBetween
|
||||
* @memberOf Phaser.Group
|
||||
* @param {Description} startIndex - Description.
|
||||
* @param {Description} endIndex - Description.
|
||||
*/
|
||||
|
@ -941,6 +969,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method destroy
|
||||
* @memberOf Phaser.Group
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
|
@ -960,6 +989,7 @@ Phaser.Group.prototype = {
|
|||
* Description.
|
||||
*
|
||||
* @method dump
|
||||
* @memberOf Phaser.Group
|
||||
*/
|
||||
dump: function (full) {
|
||||
|
||||
|
|
|
@ -29,37 +29,37 @@ Phaser.Plugin = function (game, parent) {
|
|||
this.parent = parent;
|
||||
|
||||
/**
|
||||
* @property {bool} active - Description.
|
||||
* @property {boolean} active - Description.
|
||||
* @default
|
||||
*/
|
||||
this.active = false;
|
||||
|
||||
/**
|
||||
* @property {bool} visible - Description.
|
||||
* @property {boolean} visible - Description.
|
||||
* @default
|
||||
*/
|
||||
this.visible = false;
|
||||
|
||||
/**
|
||||
* @property {bool} hasPreUpdate - Description.
|
||||
* @property {boolean} hasPreUpdate - Description.
|
||||
* @default
|
||||
*/
|
||||
this.hasPreUpdate = false;
|
||||
|
||||
/**
|
||||
* @property {bool} hasUpdate - Description.
|
||||
* @property {boolean} hasUpdate - Description.
|
||||
* @default
|
||||
*/
|
||||
this.hasUpdate = false;
|
||||
|
||||
/**
|
||||
* @property {bool} hasRender - Description.
|
||||
* @property {boolean} hasRender - Description.
|
||||
* @default
|
||||
*/
|
||||
this.hasRender = false;
|
||||
|
||||
/**
|
||||
* @property {bool} hasPostRender - Description.
|
||||
* @property {boolean} hasPostRender - Description.
|
||||
* @default
|
||||
*/
|
||||
this.hasPostRender = false;
|
||||
|
|
|
@ -47,13 +47,13 @@ Phaser.Signal.prototype = {
|
|||
* If Signal should keep record of previously dispatched parameters and
|
||||
* automatically execute listener during `add()`/`addOnce()` if Signal was
|
||||
* already dispatched before.
|
||||
* @property {bool} memorize
|
||||
* @property {boolean} memorize
|
||||
*/
|
||||
memorize: false,
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} _shouldPropagate
|
||||
* @property {boolean} _shouldPropagate
|
||||
* @private
|
||||
*/
|
||||
_shouldPropagate: true,
|
||||
|
@ -61,7 +61,7 @@ Phaser.Signal.prototype = {
|
|||
/**
|
||||
* If Signal is active and should broadcast events.
|
||||
* <p><strong>IMPORTANT:</strong> Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.</p>
|
||||
* @property {bool} active
|
||||
* @property {boolean} active
|
||||
* @default
|
||||
*/
|
||||
active: true,
|
||||
|
@ -84,7 +84,7 @@ Phaser.Signal.prototype = {
|
|||
*
|
||||
* @method _registerListener
|
||||
* @param {function} listener - Signal handler function.
|
||||
* @param {bool} isOnce - Description.
|
||||
* @param {boolean} isOnce - Description.
|
||||
* @param {object} [listenerContext] - Description.
|
||||
* @param {number} [priority] - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0).
|
||||
* @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener.
|
||||
|
@ -152,7 +152,7 @@ Phaser.Signal.prototype = {
|
|||
* @method has
|
||||
* @param {Function} listener - Signal handler function.
|
||||
* @param {Object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function).
|
||||
* @return {bool} If Signal has the specified listener.
|
||||
* @return {boolean} If Signal has the specified listener.
|
||||
*/
|
||||
has: function (listener, context) {
|
||||
return this._indexOfListener(listener, context) !== -1;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* @inner
|
||||
* @param {Signal} signal - Reference to Signal object that listener is currently bound to.
|
||||
* @param {function} listener - Handler function bound to the signal.
|
||||
* @param {bool} isOnce - If binding should be executed just once.
|
||||
* @param {boolean} isOnce - If binding should be executed just once.
|
||||
* @param {object} [listenerContext] - Context on which listener will be executed (object that should represent the `this` variable inside listener function).
|
||||
* @param {number} [priority] - The priority level of the event listener. (default = 0).
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, prio
|
|||
this._listener = listener;
|
||||
|
||||
/**
|
||||
* @property {bool} _isOnce - If binding should be executed just once.
|
||||
* @property {boolean} _isOnce - If binding should be executed just once.
|
||||
* @private
|
||||
*/
|
||||
this._isOnce = isOnce;
|
||||
|
@ -62,7 +62,7 @@ Phaser.SignalBinding.prototype = {
|
|||
|
||||
/**
|
||||
* If binding is active and should be executed.
|
||||
* @property {bool} active
|
||||
* @property {boolean} active
|
||||
* @default
|
||||
*/
|
||||
active: true,
|
||||
|
@ -112,7 +112,7 @@ Phaser.SignalBinding.prototype = {
|
|||
|
||||
/**
|
||||
* @method isBound
|
||||
* @return {bool} True if binding is still bound to the signal and has a listener.
|
||||
* @return {boolean} True if binding is still bound to the signal and has a listener.
|
||||
*/
|
||||
isBound: function () {
|
||||
return (!!this._signal && !!this._listener);
|
||||
|
@ -120,7 +120,7 @@ Phaser.SignalBinding.prototype = {
|
|||
|
||||
/**
|
||||
* @method isOnce
|
||||
* @return {bool} If SignalBinding will only be executed once.
|
||||
* @return {boolean} If SignalBinding will only be executed once.
|
||||
*/
|
||||
isOnce: function () {
|
||||
return this._isOnce;
|
||||
|
|
|
@ -51,7 +51,7 @@ Phaser.StateManager.prototype = {
|
|||
|
||||
/**
|
||||
* Flag that sets if the State has been created or not.
|
||||
* @property {bool}_created
|
||||
* @property {boolean}_created
|
||||
* @private
|
||||
*/
|
||||
_created: false,
|
||||
|
@ -160,7 +160,7 @@ Phaser.StateManager.prototype = {
|
|||
* @method add
|
||||
* @param key {string} - A unique key you use to reference this state, i.e. "MainMenu", "Level1".
|
||||
* @param state {State} - The state you want to switch to.
|
||||
* @param autoStart {bool} - Start the state immediately after creating it? (default true)
|
||||
* @param autoStart {boolean} - Start the state immediately after creating it? (default true)
|
||||
*/
|
||||
add: function (key, state, autoStart) {
|
||||
|
||||
|
@ -241,8 +241,8 @@ Phaser.StateManager.prototype = {
|
|||
* Start the given state
|
||||
* @method start
|
||||
* @param {string} key - The key of the state you want to start.
|
||||
* @param {bool} [clearWorld] - clear everything in the world? (Default to true)
|
||||
* @param {bool} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true)
|
||||
* @param {boolean} [clearWorld] - clear everything in the world? (Default to true)
|
||||
* @param {boolean} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true)
|
||||
*/
|
||||
start: function (key, clearWorld, clearCache) {
|
||||
|
||||
|
@ -327,7 +327,7 @@ Phaser.StateManager.prototype = {
|
|||
* Description.
|
||||
* @method checkState
|
||||
* @param {string} key - The key of the state you want to check.
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
checkState: function (key) {
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ Object.defineProperty(Phaser.World.prototype, "width", {
|
|||
|
||||
/**
|
||||
* @method width
|
||||
* @return {Number} The current width of the game world
|
||||
* @return {number} The current width of the game world
|
||||
*/
|
||||
get: function () {
|
||||
return this.bounds.width;
|
||||
|
@ -178,7 +178,7 @@ Object.defineProperty(Phaser.World.prototype, "width", {
|
|||
|
||||
/**
|
||||
* @method width
|
||||
* @return {Number} Sets the width of the game world
|
||||
* @return {number} Sets the width of the game world
|
||||
*/
|
||||
set: function (value) {
|
||||
this.bounds.width = value;
|
||||
|
|
|
@ -26,13 +26,13 @@ Phaser.BitmapText = function (game, x, y, text, style) {
|
|||
style = style || '';
|
||||
|
||||
/**
|
||||
* @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @default
|
||||
*/
|
||||
this.alive = true;
|
||||
|
@ -112,7 +112,7 @@ Phaser.BitmapText = function (game, x, y, text, style) {
|
|||
this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y);
|
||||
|
||||
/**
|
||||
* @property {bool} renderable - Description.
|
||||
* @property {boolean} renderable - Description.
|
||||
* @private
|
||||
*/
|
||||
this.renderable = true;
|
||||
|
|
|
@ -44,7 +44,7 @@ Phaser.GameObjectFactory.prototype = {
|
|||
* Description.
|
||||
* @method existing.
|
||||
* @param {object} - Description.
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
existing: function (object) {
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
|||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
|
||||
* @default
|
||||
*/
|
||||
this.alive = true;
|
||||
|
@ -174,7 +174,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
|||
* Note that this check doesn't look at this Sprites children, which may still be in camera range.
|
||||
* So you should set autoCull to false if the Sprite will have children likely to still be in camera range.
|
||||
*
|
||||
* @property {bool} autoCull
|
||||
* @property {boolean} autoCull
|
||||
* @default
|
||||
*/
|
||||
this.autoCull = false;
|
||||
|
@ -290,7 +290,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
|||
this.inWorldThreshold = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} _outOfBoundsFired - Description.
|
||||
* @property {boolean} _outOfBoundsFired - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -649,7 +649,7 @@ Phaser.Sprite.prototype.getBounds = function(rect) {
|
|||
*
|
||||
* @method play
|
||||
* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump".
|
||||
* @param {Number} [frameRate=null] 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.
|
||||
* @param {number} [frameRate=null] 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.
|
||||
* @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
|
||||
* @return {Phaser.Animation} A reference to playing Animation instance.
|
||||
*/
|
||||
|
@ -714,7 +714,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "frameName", {
|
|||
|
||||
/**
|
||||
* Is this sprite visible to the camera or not?
|
||||
* @returns {bool}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Object.defineProperty(Phaser.Sprite.prototype, "inCamera", {
|
||||
|
||||
|
|
|
@ -25,14 +25,14 @@ Phaser.Text = function (game, x, y, text, style) {
|
|||
|
||||
// If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all
|
||||
/**
|
||||
* @property {bool} exists - Description.
|
||||
* @property {boolean} exists - Description.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
// This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering
|
||||
/**
|
||||
* @property {bool} alive - Description.
|
||||
* @property {boolean} alive - Description.
|
||||
* @default
|
||||
*/
|
||||
this.alive = true;
|
||||
|
@ -111,7 +111,7 @@ Phaser.Text = function (game, x, y, text, style) {
|
|||
this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y);
|
||||
|
||||
/**
|
||||
* @property {bool} renderable - Description.
|
||||
* @property {boolean} renderable - Description.
|
||||
*/
|
||||
this.renderable = true;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ Phaser.Circle.prototype = {
|
|||
* (can be Circle, Point or anything with x/y properties)
|
||||
* @method distance
|
||||
* @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object.
|
||||
* @param {bool} [round] - Round the distance to the nearest integer (default false).
|
||||
* @param {boolean} [round] - Round the distance to the nearest integer (default false).
|
||||
* @return {number} The distance between this Point object and the destination Point object.
|
||||
*/
|
||||
distance: function (dest, round) {
|
||||
|
@ -144,7 +144,7 @@ Phaser.Circle.prototype = {
|
|||
* @method contains
|
||||
* @param {number} x - The X value of the coordinate to test.
|
||||
* @param {number} y - The Y value of the coordinate to test.
|
||||
* @return {bool} True if the coordinates are within this circle, otherwise false.
|
||||
* @return {boolean} True if the coordinates are within this circle, otherwise false.
|
||||
*/
|
||||
contains: function (x, y) {
|
||||
return Phaser.Circle.contains(this, x, y);
|
||||
|
@ -154,7 +154,7 @@ Phaser.Circle.prototype = {
|
|||
* Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.
|
||||
* @method circumferencePoint
|
||||
* @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from.
|
||||
* @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)?
|
||||
* @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)?
|
||||
* @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created.
|
||||
* @return {Phaser.Point} The Point object holding the result.
|
||||
*/
|
||||
|
@ -214,7 +214,7 @@ Object.defineProperty(Phaser.Circle.prototype, "diameter", {
|
|||
/**
|
||||
* The diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2.
|
||||
* @method diameter
|
||||
* @param {Number} The diameter of the circle.
|
||||
* @param {number} The diameter of the circle.
|
||||
**/
|
||||
set: function (value) {
|
||||
if (value > 0) {
|
||||
|
@ -362,7 +362,7 @@ Object.defineProperty(Phaser.Circle.prototype, "area", {
|
|||
|
||||
/**
|
||||
* Determines whether or not this Circle object is empty.
|
||||
* @return {bool} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false.
|
||||
* @return {boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false.
|
||||
*//**
|
||||
* Sets all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0.
|
||||
* @param {Description} value - Description.
|
||||
|
@ -392,7 +392,7 @@ Object.defineProperty(Phaser.Circle.prototype, "empty", {
|
|||
* @param {Phaser.Circle} a - The Circle to be checked.
|
||||
* @param {number} x - The X value of the coordinate to test.
|
||||
* @param {number} y - The Y value of the coordinate to test.
|
||||
* @return {bool} True if the coordinates are within this circle, otherwise false.
|
||||
* @return {boolean} True if the coordinates are within this circle, otherwise false.
|
||||
*/
|
||||
Phaser.Circle.contains = function (a, x, y) {
|
||||
|
||||
|
@ -415,7 +415,7 @@ Phaser.Circle.contains = function (a, x, y) {
|
|||
* @method equals
|
||||
* @param {Phaser.Circle} a - The first Circle object.
|
||||
* @param {Phaser.Circle} b - The second Circle object.
|
||||
* @return {bool} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false.
|
||||
* @return {boolean} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false.
|
||||
*/
|
||||
Phaser.Circle.equals = function (a, b) {
|
||||
return (a.x == b.x && a.y == b.y && a.diameter == b.diameter);
|
||||
|
@ -427,7 +427,7 @@ Phaser.Circle.equals = function (a, b) {
|
|||
* @method intersects
|
||||
* @param {Phaser.Circle} a - The first Circle object.
|
||||
* @param {Phaser.Circle} b - The second Circle object.
|
||||
* @return {bool} A value of true if the specified object intersects with this Circle object; otherwise false.
|
||||
* @return {boolean} A value of true if the specified object intersects with this Circle object; otherwise false.
|
||||
*/
|
||||
Phaser.Circle.intersects = function (a, b) {
|
||||
return (Phaser.Math.distance(a.x, a.y, b.x, b.y) <= (a.radius + b.radius));
|
||||
|
@ -438,7 +438,7 @@ Phaser.Circle.intersects = function (a, b) {
|
|||
* @method circumferencePoint
|
||||
* @param {Phaser.Circle} a - The first Circle object.
|
||||
* @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from.
|
||||
* @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)?
|
||||
* @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)?
|
||||
* @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created.
|
||||
* @return {Phaser.Point} The Point object holding the result.
|
||||
*/
|
||||
|
@ -463,7 +463,7 @@ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) {
|
|||
* @method intersectsRectangle
|
||||
* @param {Phaser.Circle} c - The Circle object to test.
|
||||
* @param {Phaser.Rectangle} r - The Rectangle object to test.
|
||||
* @return {bool} True if the two objects intersect, otherwise false.
|
||||
* @return {boolean} True if the two objects intersect, otherwise false.
|
||||
*/
|
||||
Phaser.Circle.intersectsRectangle = function (c, r) {
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @class Point
|
||||
* @classdesc The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
|
||||
* @constructor
|
||||
* @param {Number} x The horizontal position of this Point (default 0)
|
||||
* @param {Number} y The vertical position of this Point (default 0)
|
||||
* @param {number} x The horizontal position of this Point (default 0)
|
||||
* @param {number} y The vertical position of this Point (default 0)
|
||||
**/
|
||||
Phaser.Point = function (x, y) {
|
||||
|
||||
|
@ -182,7 +182,7 @@ Phaser.Point.prototype = {
|
|||
* Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)
|
||||
* @method distance
|
||||
* @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object.
|
||||
* @param {bool} [round] - Round the distance to the nearest integer (default false).
|
||||
* @param {boolean} [round] - Round the distance to the nearest integer (default false).
|
||||
* @return {number} The distance between this Point object and the destination Point object.
|
||||
*/
|
||||
distance: function (dest, round) {
|
||||
|
@ -195,7 +195,7 @@ Phaser.Point.prototype = {
|
|||
* Determines whether the given objects x/y values are equal to this Point object.
|
||||
* @method equals
|
||||
* @param {Phaser.Point} a - The first object to compare.
|
||||
* @return {bool} A value of true if the Points are equal, otherwise false.
|
||||
* @return {boolean} A value of true if the Points are equal, otherwise false.
|
||||
*/
|
||||
equals: function (a) {
|
||||
return (a.x == this.x && a.y == this.y);
|
||||
|
@ -207,7 +207,7 @@ Phaser.Point.prototype = {
|
|||
* @param {number} x - The x coordinate of the anchor point
|
||||
* @param {number} y - The y coordinate of the anchor point
|
||||
* @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to.
|
||||
* @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)?
|
||||
* @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)?
|
||||
* @param {number} [distance] - An optional distance constraint between the Point and the anchor.
|
||||
* @return {Phaser.Point} The modified point object.
|
||||
*/
|
||||
|
@ -309,7 +309,7 @@ Phaser.Point.divide = function (a, b, out) {
|
|||
* @method equals
|
||||
* @param {Phaser.Point} a - The first Point object.
|
||||
* @param {Phaser.Point} b - The second Point object.
|
||||
* @return {bool} A value of true if the Points are equal, otherwise false.
|
||||
* @return {boolean} A value of true if the Points are equal, otherwise false.
|
||||
*/
|
||||
Phaser.Point.equals = function (a, b) {
|
||||
return (a.x == b.x && a.y == b.y);
|
||||
|
@ -320,8 +320,8 @@ Phaser.Point.equals = function (a, b) {
|
|||
* @method distance
|
||||
* @param {object} a - The target object. Must have visible x and y properties that represent the center of the object.
|
||||
* @param {object} b - The target object. Must have visible x and y properties that represent the center of the object.
|
||||
* @param {bool} [round] - Round the distance to the nearest integer (default false).
|
||||
* @return {Number} The distance between this Point object and the destination Point object.
|
||||
* @param {boolean} [round] - Round the distance to the nearest integer (default false).
|
||||
* @return {number} The distance between this Point object and the destination Point object.
|
||||
*/
|
||||
Phaser.Point.distance = function (a, b, round) {
|
||||
|
||||
|
@ -345,7 +345,7 @@ Phaser.Point.distance = function (a, b, round) {
|
|||
* @param {number} x - The x coordinate of the anchor point
|
||||
* @param {number} y - The y coordinate of the anchor point
|
||||
* @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to.
|
||||
* @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)?
|
||||
* @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)?
|
||||
* @param {number} distance - An optional distance constraint between the Point and the anchor.
|
||||
* @return {Phaser.Point} The modified point object.
|
||||
*/
|
||||
|
|
|
@ -168,7 +168,7 @@ Phaser.Rectangle.prototype = {
|
|||
* @method contains
|
||||
* @param {number} x - The x coordinate of the point to test.
|
||||
* @param {number} y - The y coordinate of the point to test.
|
||||
* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
*/
|
||||
contains: function (x, y) {
|
||||
return Phaser.Rectangle.contains(this, x, y);
|
||||
|
@ -179,7 +179,7 @@ Phaser.Rectangle.prototype = {
|
|||
* A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.
|
||||
* @method containsRect
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
*/
|
||||
containsRect: function (b) {
|
||||
return Phaser.Rectangle.containsRect(this, b);
|
||||
|
@ -190,7 +190,7 @@ Phaser.Rectangle.prototype = {
|
|||
* This method compares the x, y, width and height properties of each Rectangle.
|
||||
* @method equals
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.
|
||||
* @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.
|
||||
*/
|
||||
equals: function (b) {
|
||||
return Phaser.Rectangle.equals(this, b);
|
||||
|
@ -213,7 +213,7 @@ Phaser.Rectangle.prototype = {
|
|||
* @method intersects
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0.
|
||||
* @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false.
|
||||
* @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false.
|
||||
*/
|
||||
intersects: function (b, tolerance) {
|
||||
return Phaser.Rectangle.intersects(this, b, tolerance);
|
||||
|
@ -227,7 +227,7 @@ Phaser.Rectangle.prototype = {
|
|||
* @param {number} top - Description.
|
||||
* @param {number} bottomt - Description.
|
||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0
|
||||
* @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false.
|
||||
* @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false.
|
||||
*/
|
||||
intersectsRaw: function (left, right, top, bottom, tolerance) {
|
||||
return Phaser.Rectangle.intersectsRaw(this, left, right, top, bottom, tolerance);
|
||||
|
@ -483,7 +483,7 @@ Object.defineProperty(Phaser.Rectangle.prototype, "topLeft", {
|
|||
|
||||
/**
|
||||
* Determines whether or not this Rectangle object is empty.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*//**
|
||||
* Sets all of the Rectangle object's properties to 0. A Rectangle object is empty if its width or height is less than or equal to 0.
|
||||
* @param {Description} value
|
||||
|
@ -506,8 +506,8 @@ Object.defineProperty(Phaser.Rectangle.prototype, "empty", {
|
|||
* Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.
|
||||
* @method inflate
|
||||
* @param {Phaser.Rectangle} a - The Rectangle object.
|
||||
* @param {Number} dx - The amount to be added to the left side of the Rectangle.
|
||||
* @param {Number} dy - The amount to be added to the bottom side of the Rectangle.
|
||||
* @param {number} dx - The amount to be added to the left side of the Rectangle.
|
||||
* @param {number} dy - The amount to be added to the bottom side of the Rectangle.
|
||||
* @return {Phaser.Rectangle} This Rectangle object.
|
||||
*/
|
||||
Phaser.Rectangle.inflate = function (a, dx, dy) {
|
||||
|
@ -559,7 +559,7 @@ Phaser.Rectangle.clone = function (a, output) {
|
|||
* @param {Phaser.Rectangle} a - The Rectangle object.
|
||||
* @param {number} x - The x coordinate of the point to test.
|
||||
* @param {number} y - The y coordinate of the point to test.
|
||||
* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.contains = function (a, x, y) {
|
||||
return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom);
|
||||
|
@ -570,7 +570,7 @@ Phaser.Rectangle.contains = function (a, x, y) {
|
|||
* @method containsPoint
|
||||
* @param {Phaser.Rectangle} a - The Rectangle object.
|
||||
* @param {Phaser.Point} point - The point object being checked. Can be Point or any object with .x and .y values.
|
||||
* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.containsPoint = function (a, point) {
|
||||
return Phaser.Phaser.Rectangle.contains(a, point.x, point.y);
|
||||
|
@ -582,7 +582,7 @@ Phaser.Rectangle.containsPoint = function (a, point) {
|
|||
* @method containsRect
|
||||
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.containsRect = function (a, b) {
|
||||
|
||||
|
@ -602,7 +602,7 @@ Phaser.Rectangle.containsRect = function (a, b) {
|
|||
* @method equals
|
||||
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.
|
||||
* @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.equals = function (a, b) {
|
||||
return (a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height);
|
||||
|
@ -639,7 +639,7 @@ Phaser.Rectangle.intersection = function (a, b, out) {
|
|||
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
||||
* @param {Phaser.Rectangle} b - The second Rectangle object.
|
||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0
|
||||
* @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false.
|
||||
* @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.intersects = function (a, b, tolerance) {
|
||||
|
||||
|
@ -657,7 +657,7 @@ Phaser.Rectangle.intersects = function (a, b, tolerance) {
|
|||
* @param {number} top - Description.
|
||||
* @param {number} bottom - Description.
|
||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0
|
||||
* @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false.
|
||||
* @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false.
|
||||
*/
|
||||
Phaser.Rectangle.intersectsRaw = function (a, left, right, top, bottom, tolerance) {
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Phaser.Input.prototype = {
|
|||
/**
|
||||
* You can disable all Input by setting Input.disabled: true. While set all new input related events will be ignored.
|
||||
* If you need to disable just one type of input, for example mouse, use Input.mouse.disabled: true instead
|
||||
* @property {bool} disabled
|
||||
* @property {boolean} disabled
|
||||
* @default
|
||||
*/
|
||||
disabled: false,
|
||||
|
@ -182,7 +182,7 @@ Phaser.Input.prototype = {
|
|||
* Sets if the Pointer objects should record a history of x/y coordinates they have passed through.
|
||||
* The history is cleared each time the Pointer is pressed down.
|
||||
* The history is updated at the rate specified in Input.pollRate
|
||||
* @property {bool} recordPointerHistory
|
||||
* @property {boolean} recordPointerHistory
|
||||
* @default
|
||||
**/
|
||||
recordPointerHistory: false,
|
||||
|
@ -446,7 +446,7 @@ Phaser.Input.prototype = {
|
|||
/**
|
||||
* Reset all of the Pointers and Input states
|
||||
* @method reset
|
||||
* @param {bool} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will.
|
||||
* @param {boolean} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will.
|
||||
**/
|
||||
reset: function (hard) {
|
||||
|
||||
|
@ -597,7 +597,7 @@ Phaser.Input.prototype = {
|
|||
/**
|
||||
* Get the next Pointer object whos active property matches the given state
|
||||
* @method getPointer
|
||||
* @param {bool} state - The state the Pointer should be in (false for inactive, true for active).
|
||||
* @param {boolean} state - The state the Pointer should be in (false for inactive, true for active).
|
||||
* @return {Pointer} A Pointer object or null if no Pointer object matches the requested state.
|
||||
**/
|
||||
getPointer: function (state) {
|
||||
|
|
|
@ -25,7 +25,7 @@ Phaser.InputHandler = function (sprite) {
|
|||
this.sprite = sprite;
|
||||
|
||||
/**
|
||||
* @property {bool} enabled - Description.
|
||||
* @property {boolean} enabled - Description.
|
||||
* @default
|
||||
*/
|
||||
this.enabled = false;
|
||||
|
@ -68,31 +68,31 @@ Phaser.InputHandler = function (sprite) {
|
|||
this.priorityID = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} useHandCursor - Description.
|
||||
* @property {boolean} useHandCursor - Description.
|
||||
* @default
|
||||
*/
|
||||
this.useHandCursor = false;
|
||||
|
||||
/**
|
||||
* @property {bool} isDragged - Description.
|
||||
* @property {boolean} isDragged - Description.
|
||||
* @default
|
||||
*/
|
||||
this.isDragged = false;
|
||||
|
||||
/**
|
||||
* @property {bool} allowHorizontalDrag - Description.
|
||||
* @property {boolean} allowHorizontalDrag - Description.
|
||||
* @default
|
||||
*/
|
||||
this.allowHorizontalDrag = true;
|
||||
|
||||
/**
|
||||
* @property {bool} allowVerticalDrag - Description.
|
||||
* @property {boolean} allowVerticalDrag - Description.
|
||||
* @default
|
||||
*/
|
||||
this.allowVerticalDrag = true;
|
||||
|
||||
/**
|
||||
* @property {bool} bringToTop - Description.
|
||||
* @property {boolean} bringToTop - Description.
|
||||
* @default
|
||||
*/
|
||||
this.bringToTop = false;
|
||||
|
@ -104,13 +104,13 @@ Phaser.InputHandler = function (sprite) {
|
|||
this.snapOffset = null;
|
||||
|
||||
/**
|
||||
* @property {bool} snapOnDrag - Description.
|
||||
* @property {boolean} snapOnDrag - Description.
|
||||
* @default
|
||||
*/
|
||||
this.snapOnDrag = false;
|
||||
|
||||
/**
|
||||
* @property {bool} snapOnRelease - Description.
|
||||
* @property {boolean} snapOnRelease - Description.
|
||||
* @default
|
||||
*/
|
||||
this.snapOnRelease = false;
|
||||
|
@ -140,7 +140,7 @@ Phaser.InputHandler = function (sprite) {
|
|||
this.pixelPerfectAlpha = 255;
|
||||
|
||||
/**
|
||||
* @property {bool} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no
|
||||
* @property {boolean} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no
|
||||
* @default
|
||||
*/
|
||||
this.draggable = false;
|
||||
|
@ -160,7 +160,7 @@ Phaser.InputHandler = function (sprite) {
|
|||
/**
|
||||
* If this object is set to consume the pointer event then it will stop all propogation from this object on.
|
||||
* For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it.
|
||||
* @property {bool} consumePointerEvent
|
||||
* @property {boolean} consumePointerEvent
|
||||
* @default
|
||||
*/
|
||||
this.consumePointerEvent = false;
|
||||
|
@ -197,7 +197,7 @@ Phaser.InputHandler.prototype = {
|
|||
* Description.
|
||||
* @method start
|
||||
* @param {number} priority - Description.
|
||||
* @param {bool} useHandCursor - Description.
|
||||
* @param {boolean} useHandCursor - Description.
|
||||
* @return {Phaser.Sprite} Description.
|
||||
*/
|
||||
start: function (priority, useHandCursor) {
|
||||
|
@ -348,7 +348,7 @@ Phaser.InputHandler.prototype = {
|
|||
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
|
||||
* @method pointerDown
|
||||
* @param {Pointer} pointer
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
pointerDown: function (pointer) {
|
||||
|
||||
|
@ -362,7 +362,7 @@ Phaser.InputHandler.prototype = {
|
|||
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true
|
||||
* @method pointerUp
|
||||
* @param {Pointer} pointer
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
pointerUp: function (pointer) {
|
||||
|
||||
|
@ -418,7 +418,7 @@ Phaser.InputHandler.prototype = {
|
|||
* Is the Pointer outside of this Sprite?
|
||||
* @method pointerOut
|
||||
* @param {Pointer} pointer
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
pointerOut: function (pointer) {
|
||||
|
||||
|
@ -474,7 +474,7 @@ Phaser.InputHandler.prototype = {
|
|||
* Checks if the given pointer is over this Sprite.
|
||||
* @method checkPointerOver
|
||||
* @param {Pointer} pointer
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
checkPointerOver: function (pointer) {
|
||||
|
||||
|
@ -513,7 +513,7 @@ Phaser.InputHandler.prototype = {
|
|||
* @method checkPixel
|
||||
* @param {Description} x - Description.
|
||||
* @param {Description} y - Description.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
checkPixel: function (x, y) {
|
||||
|
||||
|
@ -696,7 +696,7 @@ Phaser.InputHandler.prototype = {
|
|||
* Updates the Pointer drag on this Sprite.
|
||||
* @method updateDrag
|
||||
* @param {Pointer} pointer
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
updateDrag: function (pointer) {
|
||||
|
||||
|
@ -741,7 +741,7 @@ Phaser.InputHandler.prototype = {
|
|||
* @method justOver
|
||||
* @param {Pointer} pointer
|
||||
* @param {number} delay - The time below which the pointer is considered as just over.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justOver: function (pointer, delay) {
|
||||
|
||||
|
@ -757,7 +757,7 @@ Phaser.InputHandler.prototype = {
|
|||
* @method justOut
|
||||
* @param {Pointer} pointer
|
||||
* @param {number} delay - The time below which the pointer is considered as just out.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justOut: function (pointer, delay) {
|
||||
|
||||
|
@ -773,7 +773,7 @@ Phaser.InputHandler.prototype = {
|
|||
* @method justPressed
|
||||
* @param {Pointer} pointer
|
||||
* @param {number} delay - The time below which the pointer is considered as just over.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justPressed: function (pointer, delay) {
|
||||
|
||||
|
@ -789,7 +789,7 @@ Phaser.InputHandler.prototype = {
|
|||
* @method justReleased
|
||||
* @param {Pointer} pointer
|
||||
* @param {number} delay - The time below which the pointer is considered as just out.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justReleased: function (pointer, delay) {
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ Phaser.Key.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Number} [duration]
|
||||
* @return {bool}
|
||||
* @param {number} [duration]
|
||||
* @return {boolean}
|
||||
*/
|
||||
justPressed: function (duration) {
|
||||
|
||||
|
@ -128,8 +128,8 @@ Phaser.Key.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Number} [duration]
|
||||
* @return {bool}
|
||||
* @param {number} [duration]
|
||||
* @return {boolean}
|
||||
*/
|
||||
justReleased: function (duration) {
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ Phaser.Keyboard.prototype = {
|
|||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @default
|
||||
* @property {bool} disabled
|
||||
* @property {boolean} disabled
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
|
@ -284,7 +284,7 @@ Phaser.Keyboard.prototype = {
|
|||
* @method justPressed
|
||||
* @param {number} keycode
|
||||
* @param {number} [duration]
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justPressed: function (keycode, duration) {
|
||||
|
||||
|
@ -304,7 +304,7 @@ Phaser.Keyboard.prototype = {
|
|||
* @method justReleased
|
||||
* @param {number} keycode
|
||||
* @param {number} [duration]
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justReleased: function (keycode, duration) {
|
||||
|
||||
|
@ -323,7 +323,7 @@ Phaser.Keyboard.prototype = {
|
|||
* Description.
|
||||
* @method isDown
|
||||
* @param {number} keycode
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
isDown: function (keycode) {
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ Phaser.MSPointer.prototype = {
|
|||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @property {bool} disabled
|
||||
* @property {boolean} disabled
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
|
|
|
@ -59,14 +59,14 @@ Phaser.Mouse.prototype = {
|
|||
|
||||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @property {bool} disabled
|
||||
* @property {boolean} disabled
|
||||
* @default
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
/**
|
||||
* If the mouse has been Pointer Locked successfully this will be set to true.
|
||||
* @property {bool} locked
|
||||
* @property {boolean} locked
|
||||
* @default
|
||||
*/
|
||||
locked: false,
|
||||
|
|
|
@ -18,7 +18,7 @@ Phaser.Pointer = function (game, id) {
|
|||
|
||||
/**
|
||||
* Local private variable to store the status of dispatching a hold event.
|
||||
* @property {bool} _holdSent
|
||||
* @property {boolean} _holdSent
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@ Phaser.Pointer = function (game, id) {
|
|||
|
||||
/**
|
||||
* Monitor events outside of a state reset loop.
|
||||
* @property {bool} _stateReset
|
||||
* @property {boolean} _stateReset
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -71,7 +71,7 @@ Phaser.Pointer = function (game, id) {
|
|||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} withinGame
|
||||
* @property {boolean} withinGame
|
||||
*/
|
||||
this.withinGame = false;
|
||||
|
||||
|
@ -133,21 +133,21 @@ Phaser.Pointer = function (game, id) {
|
|||
|
||||
/**
|
||||
* If the Pointer is a mouse this is true, otherwise false.
|
||||
* @property {bool} isMouse
|
||||
* @type {bool}
|
||||
* @property {boolean} isMouse
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isMouse = false;
|
||||
|
||||
/**
|
||||
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
|
||||
* @property {bool} isDown
|
||||
* @property {boolean} isDown
|
||||
* @default
|
||||
*/
|
||||
this.isDown = false;
|
||||
|
||||
/**
|
||||
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true.
|
||||
* @property {bool} isUp
|
||||
* @property {boolean} isUp
|
||||
* @default
|
||||
*/
|
||||
this.isUp = true;
|
||||
|
@ -206,7 +206,7 @@ Phaser.Pointer = function (game, id) {
|
|||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} isDown - Description.
|
||||
* @property {boolean} isDown - Description.
|
||||
* @default
|
||||
*/
|
||||
this.active = false;
|
||||
|
@ -575,7 +575,7 @@ Phaser.Pointer.prototype = {
|
|||
* The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.
|
||||
* @method justPressed
|
||||
* @param {number} [duration]
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justPressed: function (duration) {
|
||||
|
||||
|
@ -589,7 +589,7 @@ Phaser.Pointer.prototype = {
|
|||
* The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.
|
||||
* @method justReleased
|
||||
* @param {number} [duration]
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
justReleased: function (duration) {
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ Phaser.Touch = function (game) {
|
|||
this.touchCancelCallback = null;
|
||||
|
||||
/**
|
||||
* @property {bool} preventDefault - Description.
|
||||
* @property {boolean} preventDefault - Description.
|
||||
* @default
|
||||
*/
|
||||
this.preventDefault = true;
|
||||
|
@ -81,7 +81,7 @@ Phaser.Touch.prototype = {
|
|||
/**
|
||||
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||
* @method disabled
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ Phaser.Cache.prototype = {
|
|||
/**
|
||||
* Checks if an image key exists.
|
||||
* @param {string} key - Asset key of the image you want.
|
||||
* @return {bool} True if the key exists, otherwise false.
|
||||
* @return {boolean} True if the key exists, otherwise false.
|
||||
*/
|
||||
checkImageKey: function (key) {
|
||||
|
||||
|
|
|
@ -54,13 +54,13 @@ Phaser.Loader = function (game) {
|
|||
this.queueSize = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} isLoading - True if the Loader is in the process of loading the queue.
|
||||
* @property {boolean} isLoading - True if the Loader is in the process of loading the queue.
|
||||
* @default
|
||||
*/
|
||||
this.isLoading = false;
|
||||
|
||||
/**
|
||||
* @property {bool} hasLoaded - True if all assets in the queue have finished loading.
|
||||
* @property {boolean} hasLoaded - True if all assets in the queue have finished loading.
|
||||
* @default
|
||||
*/
|
||||
this.hasLoaded = false;
|
||||
|
@ -155,7 +155,7 @@ Phaser.Loader.prototype = {
|
|||
* Check whether asset exists with a specific key.
|
||||
* @method checkKeyExists
|
||||
* @param {string} key - Key of the asset you want to check.
|
||||
* @return {bool} Return true if exists, otherwise return false.
|
||||
* @return {boolean} Return true if exists, otherwise return false.
|
||||
*/
|
||||
checkKeyExists: function (key) {
|
||||
|
||||
|
@ -240,7 +240,7 @@ Phaser.Loader.prototype = {
|
|||
* @method text
|
||||
* @param {string} key - Unique asset key of the text file.
|
||||
* @param {string} url - URL of the text file.
|
||||
* @param {bool} overwrite - True if Description.
|
||||
* @param {boolean} overwrite - True if Description.
|
||||
*/
|
||||
text: function (key, url, overwrite) {
|
||||
|
||||
|
@ -278,7 +278,7 @@ Phaser.Loader.prototype = {
|
|||
* @method audio
|
||||
* @param {string} key - Unique asset key of the audio file.
|
||||
* @param {Array} urls - An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ].
|
||||
* @param {bool} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process.
|
||||
* @param {boolean} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process.
|
||||
*/
|
||||
audio: function (key, urls, autoDecode) {
|
||||
|
||||
|
@ -978,7 +978,7 @@ Phaser.Loader.prototype = {
|
|||
/**
|
||||
* Handle loading next file.
|
||||
* @param previousKey {string} Key of previous loaded asset.
|
||||
* @param success {bool} Whether the previous asset loaded successfully or not.
|
||||
* @param success {boolean} Whether the previous asset loaded successfully or not.
|
||||
*/
|
||||
nextFile: function (previousKey, success) {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Phaser.Math = {
|
|||
* @param {number} a
|
||||
* @param {number} b
|
||||
* @param {number} epsilon
|
||||
* @return {bool} True if |a-b|<ε
|
||||
* @return {boolean} True if |a-b|<ε
|
||||
*/
|
||||
fuzzyEqual: function (a, b, epsilon) {
|
||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||
|
@ -38,7 +38,7 @@ Phaser.Math = {
|
|||
* @param {number} a
|
||||
* @param {number} b
|
||||
* @param {number} epsilon
|
||||
* @return {bool} True if a<b+ε
|
||||
* @return {boolean} True if a<b+ε
|
||||
*/
|
||||
fuzzyLessThan: function (a, b, epsilon) {
|
||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||
|
@ -51,7 +51,7 @@ Phaser.Math = {
|
|||
* @param {number} a
|
||||
* @param {number} b
|
||||
* @param {number} epsilon
|
||||
* @return {bool} True if a>b+ε
|
||||
* @return {boolean} True if a>b+ε
|
||||
*/
|
||||
fuzzyGreaterThan: function (a, b, epsilon) {
|
||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||
|
@ -62,7 +62,7 @@ Phaser.Math = {
|
|||
* @method fuzzyCeil
|
||||
* @param {number} val
|
||||
* @param {number} epsilon
|
||||
* @return {bool} ceiling(val-ε)
|
||||
* @return {boolean} ceiling(val-ε)
|
||||
*/
|
||||
fuzzyCeil: function (val, epsilon) {
|
||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||
|
@ -73,7 +73,7 @@ Phaser.Math = {
|
|||
* @method fuzzyFloor
|
||||
* @param {number} val
|
||||
* @param {number} epsilon
|
||||
* @return {bool} floor(val-ε)
|
||||
* @return {boolean} floor(val-ε)
|
||||
*/
|
||||
fuzzyFloor: function (val, epsilon) {
|
||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||
|
@ -198,7 +198,7 @@ Phaser.Math = {
|
|||
* @method
|
||||
* @param {number} input
|
||||
* @param {array} arr
|
||||
* @param {bool} sort - True if the array needs to be sorted.
|
||||
* @param {boolean} sort - True if the array needs to be sorted.
|
||||
*/
|
||||
snapToInArray: function (input, arr, sort) {
|
||||
|
||||
|
@ -332,7 +332,7 @@ Phaser.Math = {
|
|||
* Set an angle within the bounds of -π toπ.
|
||||
* @method normalizeAngle
|
||||
* @param {number} angle
|
||||
* @param {bool} radians - True if angle size is expressed in radians.
|
||||
* @param {boolean} radians - True if angle size is expressed in radians.
|
||||
*/
|
||||
normalizeAngle: function (angle, radians) {
|
||||
|
||||
|
@ -349,7 +349,7 @@ Phaser.Math = {
|
|||
* @method nearestAngleBetween
|
||||
* @param {number} a1
|
||||
* @param {number} a2
|
||||
* @param {bool} radians - True if angle sizes are expressed in radians.
|
||||
* @param {boolean} radians - True if angle sizes are expressed in radians.
|
||||
*/
|
||||
nearestAngleBetween: function (a1, a2, radians) {
|
||||
|
||||
|
@ -379,7 +379,7 @@ Phaser.Math = {
|
|||
* @param {number} a1 - Description.
|
||||
* @param {number} a2 - Description.
|
||||
* @param {number} weight - Description.
|
||||
* @param {bool} radians - True if angle sizes are expressed in radians.
|
||||
* @param {boolean} radians - True if angle sizes are expressed in radians.
|
||||
* @param {Description} ease - Description.
|
||||
*/
|
||||
interpolateAngles: function (a1, a2, weight, radians, ease) {
|
||||
|
@ -402,7 +402,7 @@ Phaser.Math = {
|
|||
* </p>
|
||||
* @method chanceRoll
|
||||
* @param {number} chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).
|
||||
* @return {bool} True if the roll passed, or false otherwise.
|
||||
* @return {boolean} True if the roll passed, or false otherwise.
|
||||
*/
|
||||
chanceRoll: function (chance) {
|
||||
|
||||
|
@ -557,7 +557,7 @@ Phaser.Math = {
|
|||
*
|
||||
* @method isOdd
|
||||
* @param {number} n - The number to check.
|
||||
* @return {bool} True if the given number is odd. False if the given number is even.
|
||||
* @return {boolean} True if the given number is odd. False if the given number is even.
|
||||
*/
|
||||
isOdd: function (n) {
|
||||
|
||||
|
@ -570,7 +570,7 @@ Phaser.Math = {
|
|||
*
|
||||
* @method isEven
|
||||
* @param {number} n - The number to check.
|
||||
* @return {bool} True if the given number is even. False if the given number is odd.
|
||||
* @return {boolean} True if the given number is even. False if the given number is odd.
|
||||
*/
|
||||
isEven: function (n) {
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
|||
|
||||
/**
|
||||
* How often a particle is emitted in ms (if emitter is started with Explode == false).
|
||||
* @property {bool} frequency
|
||||
* @property {boolean} frequency
|
||||
* @default
|
||||
*/
|
||||
this.frequency = 100;
|
||||
|
@ -187,7 +187,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
|||
|
||||
/**
|
||||
* Internal helper for the style of particle emission (all at once, or one at a time).
|
||||
* @property {bool} _explode
|
||||
* @property {boolean} _explode
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -196,14 +196,14 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
|||
/**
|
||||
* Determines whether the emitter is currently emitting particles.
|
||||
* It is totally safe to directly toggle this.
|
||||
* @property {bool} on
|
||||
* @property {boolean} on
|
||||
* @default
|
||||
*/
|
||||
this.on = false;
|
||||
|
||||
/**
|
||||
* Determines whether the emitter is being updated by the core game loop.
|
||||
* @property {bool} exists
|
||||
* @property {boolean} exists
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
@ -212,7 +212,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
|||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {bool} emitX
|
||||
* @property {boolean} emitX
|
||||
*/
|
||||
this.emitX = x;
|
||||
|
||||
|
@ -220,7 +220,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
|||
* The point the particles are emitted from.
|
||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
||||
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||
* @property {bool} emitY
|
||||
* @property {boolean} emitY
|
||||
*/
|
||||
this.emitY = y;
|
||||
|
||||
|
@ -281,7 +281,7 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () {
|
|||
* @param {number} frames - Description.
|
||||
* @param {number} quantity - The number of particles to generate when using the "create from image" option.
|
||||
* @param {number} collide - Description.
|
||||
* @param {bool} collideWorldBounds - Description.
|
||||
* @param {boolean} collideWorldBounds - Description.
|
||||
* @return This Emitter instance (nice for chaining stuff together, if you're into that).
|
||||
*/
|
||||
Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames, quantity, collide, collideWorldBounds) {
|
||||
|
@ -582,10 +582,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "alpha", {
|
|||
|
||||
/**
|
||||
* Get the emitter visible state.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*//**
|
||||
* Set the emitter visible state.
|
||||
* @param {bool} value - Description
|
||||
* @param {boolean} value - Description
|
||||
*/
|
||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", {
|
||||
|
||||
|
@ -601,10 +601,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*//**
|
||||
* Set
|
||||
* @param {bool} value - Description
|
||||
* @param {boolean} value - Description
|
||||
*/
|
||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", {
|
||||
|
||||
|
@ -620,10 +620,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*//**
|
||||
* Set
|
||||
* @param {bool} value - Description
|
||||
* @param {boolean} value - Description
|
||||
*/
|
||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", {
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
|
|||
/**
|
||||
* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
|
||||
* @method bottom
|
||||
* @return {Number}
|
||||
* @return {number}
|
||||
**/
|
||||
get: function () {
|
||||
return this.y + this.height;
|
||||
|
@ -264,7 +264,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
|
|||
/**
|
||||
* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
|
||||
* @method bottom
|
||||
* @param {Number} value
|
||||
* @param {number} value
|
||||
**/
|
||||
set: function (value) {
|
||||
|
||||
|
@ -287,7 +287,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
|
|||
* The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties.
|
||||
* However it does affect the width property.
|
||||
* @method right
|
||||
* @return {Number}
|
||||
* @return {number}
|
||||
**/
|
||||
get: function () {
|
||||
return this.x + this.width;
|
||||
|
@ -297,7 +297,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
|
|||
* The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties.
|
||||
* However it does affect the width property.
|
||||
* @method right
|
||||
* @param {Number} value
|
||||
* @param {number} value
|
||||
**/
|
||||
set: function (value) {
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
*
|
||||
* @class Circle
|
||||
* @constructor
|
||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param radius {Number} The radius of the circle
|
||||
* @param x {number} The X coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param y {number} The Y coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param radius {number} The radius of the circle
|
||||
*/
|
||||
PIXI.Circle = function(x, y, radius)
|
||||
{
|
||||
|
@ -50,8 +50,8 @@ PIXI.Circle.prototype.clone = function()
|
|||
* Checks if the x, and y coords passed to this function are contained within this circle
|
||||
*
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @param x {number} The X coord of the point to test
|
||||
* @param y {number} The Y coord of the point to test
|
||||
* @return {Boolean} if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Circle.prototype.contains = function(x, y)
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
*
|
||||
* @class Ellipse
|
||||
* @constructor
|
||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle of this ellipse
|
||||
* @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this ellipse
|
||||
* @param width {Number} The overall height of this ellipse
|
||||
* @param height {Number} The overall width of this ellipse
|
||||
* @param x {number} The X coord of the upper-left corner of the framing rectangle of this ellipse
|
||||
* @param y {number} The Y coord of the upper-left corner of the framing rectangle of this ellipse
|
||||
* @param width {number} The overall height of this ellipse
|
||||
* @param height {number} The overall width of this ellipse
|
||||
*/
|
||||
PIXI.Ellipse = function(x, y, width, height)
|
||||
{
|
||||
|
@ -58,8 +58,8 @@ PIXI.Ellipse.prototype.clone = function()
|
|||
* Checks if the x, and y coords passed to this function are contained within this ellipse
|
||||
*
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @param x {number} The X coord of the point to test
|
||||
* @param y {number} The Y coord of the point to test
|
||||
* @return {Boolean} if the x/y coords are within this ellipse
|
||||
*/
|
||||
PIXI.Ellipse.prototype.contains = function(x, y)
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*
|
||||
* @class Point
|
||||
* @constructor
|
||||
* @param x {Number} position of the point
|
||||
* @param y {Number} position of the point
|
||||
* @param x {number} position of the point
|
||||
* @param y {number} position of the point
|
||||
*/
|
||||
PIXI.Point = function(x, y)
|
||||
{
|
||||
|
|
|
@ -52,8 +52,8 @@ PIXI.Polygon.prototype.clone = function()
|
|||
* Checks if the x, and y coords passed to this function are contained within this polygon
|
||||
*
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @param x {number} The X coord of the point to test
|
||||
* @param y {number} The Y coord of the point to test
|
||||
* @return {Boolean} if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Polygon.prototype.contains = function(x, y)
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
*
|
||||
* @class Rectangle
|
||||
* @constructor
|
||||
* @param x {Number} The X coord of the upper-left corner of the rectangle
|
||||
* @param y {Number} The Y coord of the upper-left corner of the rectangle
|
||||
* @param width {Number} The overall wisth of this rectangle
|
||||
* @param height {Number} The overall height of this rectangle
|
||||
* @param x {number} The X coord of the upper-left corner of the rectangle
|
||||
* @param y {number} The Y coord of the upper-left corner of the rectangle
|
||||
* @param width {number} The overall wisth of this rectangle
|
||||
* @param height {number} The overall height of this rectangle
|
||||
*/
|
||||
PIXI.Rectangle = function(x, y, width, height)
|
||||
{
|
||||
|
@ -58,8 +58,8 @@ PIXI.Rectangle.prototype.clone = function()
|
|||
* Checks if the x, and y coords passed to this function are contained within this Rectangle
|
||||
*
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @param x {number} The X coord of the point to test
|
||||
* @param y {number} The Y coord of the point to test
|
||||
* @return {Boolean} if the x/y coords are within this Rectangle
|
||||
*/
|
||||
PIXI.Rectangle.prototype.contains = function(x, y)
|
||||
|
|
|
@ -134,7 +134,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
|||
*
|
||||
* @method addChildAt
|
||||
* @param child {DisplayObject} The child to add
|
||||
* @param index {Number} The index to place the child in
|
||||
* @param index {number} The index to place the child in
|
||||
*/
|
||||
PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
|||
* Returns the Child at the specified index
|
||||
*
|
||||
* @method getChildAt
|
||||
* @param index {Number} The index to get the child from
|
||||
* @param index {number} The index to get the child from
|
||||
*/
|
||||
PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ PIXI.MovieClip.prototype.play = function()
|
|||
* Stops the MovieClip and goes to a specific frame
|
||||
*
|
||||
* @method gotoAndStop
|
||||
* @param frameNumber {Number} frame index to stop at
|
||||
* @param frameNumber {number} frame index to stop at
|
||||
*/
|
||||
PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber)
|
|||
* Goes to a specific frame and begins playing the MovieClip
|
||||
*
|
||||
* @method gotoAndPlay
|
||||
* @param frameNumber {Number} frame index to start at
|
||||
* @param frameNumber {number} frame index to start at
|
||||
*/
|
||||
PIXI.MovieClip.prototype.gotoAndPlay = function(frameNumber)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @class Stage
|
||||
* @extends DisplayObjectContainer
|
||||
* @constructor
|
||||
* @param backgroundColor {Number} the background color of the stage, easiest way to pass this in is in hex format
|
||||
* @param backgroundColor {number} the background color of the stage, easiest way to pass this in is in hex format
|
||||
* like: 0xFFFFFF for white
|
||||
* @param interactive {Boolean} enable / disable interaction (default is false)
|
||||
*/
|
||||
|
@ -99,7 +99,7 @@ PIXI.Stage.prototype.updateTransform = function()
|
|||
* Sets the background color for the stage
|
||||
*
|
||||
* @method setBackgroundColor
|
||||
* @param backgroundColor {Number} the color of the background, easiest way to pass this in is in hex format
|
||||
* @param backgroundColor {number} the color of the background, easiest way to pass this in is in hex format
|
||||
* like: 0xFFFFFF for white
|
||||
*/
|
||||
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* @extends DisplayObjectContainer
|
||||
* @constructor
|
||||
* @param texture {Texture} the texture of the tiling sprite
|
||||
* @param width {Number} the width of the tiling sprite
|
||||
* @param height {Number} the height of the tiling sprite
|
||||
* @param width {number} the width of the tiling sprite
|
||||
* @param height {number} the height of the tiling sprite
|
||||
*/
|
||||
PIXI.TilingSprite = function(texture, width, height)
|
||||
{
|
||||
|
|
|
@ -69,9 +69,9 @@ PIXI.Graphics.prototype.constructor = PIXI.Graphics;
|
|||
* Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.
|
||||
*
|
||||
* @method lineStyle
|
||||
* @param lineWidth {Number} width of the line to draw, will update the object's stored style
|
||||
* @param color {Number} color of the line to draw, will update the object's stored style
|
||||
* @param alpha {Number} alpha of the line to draw, will update the object's stored style
|
||||
* @param lineWidth {number} width of the line to draw, will update the object's stored style
|
||||
* @param color {number} color of the line to draw, will update the object's stored style
|
||||
* @param alpha {number} alpha of the line to draw, will update the object's stored style
|
||||
*/
|
||||
PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha)
|
||||
{
|
||||
|
@ -91,8 +91,8 @@ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha)
|
|||
* Moves the current drawing position to (x, y).
|
||||
*
|
||||
* @method moveTo
|
||||
* @param x {Number} the X coord to move to
|
||||
* @param y {Number} the Y coord to move to
|
||||
* @param x {number} the X coord to move to
|
||||
* @param y {number} the Y coord to move to
|
||||
*/
|
||||
PIXI.Graphics.prototype.moveTo = function(x, y)
|
||||
{
|
||||
|
@ -111,8 +111,8 @@ PIXI.Graphics.prototype.moveTo = function(x, y)
|
|||
* the current drawing position is then set to (x, y).
|
||||
*
|
||||
* @method lineTo
|
||||
* @param x {Number} the X coord to draw to
|
||||
* @param y {Number} the Y coord to draw to
|
||||
* @param x {number} the X coord to draw to
|
||||
* @param y {number} the Y coord to draw to
|
||||
*/
|
||||
PIXI.Graphics.prototype.lineTo = function(x, y)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ PIXI.Graphics.prototype.lineTo = function(x, y)
|
|||
*
|
||||
* @method beginFill
|
||||
* @param color {uint} the color of the fill
|
||||
* @param alpha {Number} the alpha
|
||||
* @param alpha {number} the alpha
|
||||
*/
|
||||
PIXI.Graphics.prototype.beginFill = function(color, alpha)
|
||||
{
|
||||
|
@ -150,10 +150,10 @@ PIXI.Graphics.prototype.endFill = function()
|
|||
/**
|
||||
* @method drawRect
|
||||
*
|
||||
* @param x {Number} The X coord of the top-left of the rectangle
|
||||
* @param y {Number} The Y coord of the top-left of the rectangle
|
||||
* @param width {Number} The width of the rectangle
|
||||
* @param height {Number} The height of the rectangle
|
||||
* @param x {number} The X coord of the top-left of the rectangle
|
||||
* @param y {number} The Y coord of the top-left of the rectangle
|
||||
* @param width {number} The width of the rectangle
|
||||
* @param height {number} The height of the rectangle
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
|
||||
{
|
||||
|
@ -171,9 +171,9 @@ PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
|
|||
* Draws a circle.
|
||||
*
|
||||
* @method drawCircle
|
||||
* @param x {Number} The X coord of the center of the circle
|
||||
* @param y {Number} The Y coord of the center of the circle
|
||||
* @param radius {Number} The radius of the circle
|
||||
* @param x {number} The X coord of the center of the circle
|
||||
* @param y {number} The Y coord of the center of the circle
|
||||
* @param radius {number} The radius of the circle
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
||||
{
|
||||
|
@ -191,10 +191,10 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
|||
* Draws an elipse.
|
||||
*
|
||||
* @method drawElipse
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
* @param width {Number}
|
||||
* @param height {Number}
|
||||
* @param x {number}
|
||||
* @param y {number}
|
||||
* @param width {number}
|
||||
* @param height {number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawElipse = function( x, y, width, height)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*
|
||||
* @class CanvasRenderer
|
||||
* @constructor
|
||||
* @param width=0 {Number} the width of the canvas view
|
||||
* @param height=0 {Number} the height of the canvas view
|
||||
* @param width=0 {number} the width of the canvas view
|
||||
* @param height=0 {number} the height of the canvas view
|
||||
* @param view {Canvas} the canvas to use as a view, optional
|
||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
||||
*/
|
||||
|
@ -114,8 +114,8 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
|
|||
* resizes the canvas view to the specified width and height
|
||||
*
|
||||
* @method resize
|
||||
* @param width {Number} the new width of the canvas view
|
||||
* @param height {Number} the new height of the canvas view
|
||||
* @param width {number} the new width of the canvas view
|
||||
* @param height {number} the new height of the canvas view
|
||||
*/
|
||||
PIXI.CanvasRenderer.prototype.resize = function(width, height)
|
||||
{
|
||||
|
|
|
@ -16,8 +16,8 @@ PIXI.gl;
|
|||
*
|
||||
* @class WebGLRenderer
|
||||
* @constructor
|
||||
* @param width=0 {Number} the width of the canvas view
|
||||
* @param height=0 {Number} the height of the canvas view
|
||||
* @param width=0 {number} the width of the canvas view
|
||||
* @param height=0 {number} the height of the canvas view
|
||||
* @param view {Canvas} the canvas to use as a view, optional
|
||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
||||
* @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment)
|
||||
|
@ -277,8 +277,8 @@ PIXI.WebGLRenderer.destroyTexture = function(texture)
|
|||
* resizes the webGL view to the specified width and height
|
||||
*
|
||||
* @method resize
|
||||
* @param width {Number} the new width of the webGL view
|
||||
* @param height {Number} the new height of the webGL view
|
||||
* @param width {number} the new width of the webGL view
|
||||
* @param height {number} the new height of the webGL view
|
||||
*/
|
||||
PIXI.WebGLRenderer.prototype.resize = function(width, height)
|
||||
{
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
* @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||
* @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right")
|
||||
* @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||
* @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
||||
* @param [style.wordWrapWidth=100] {Number} The width at which text will wrap
|
||||
* @param [style.wordWrapWidth=100] {number} The width at which text will wrap
|
||||
*/
|
||||
PIXI.Text = function(text, style)
|
||||
{
|
||||
|
@ -44,9 +44,9 @@ PIXI.Text.prototype.constructor = PIXI.Text;
|
|||
* @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00"
|
||||
* @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right")
|
||||
* @param [style.stroke="black"] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00"
|
||||
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||
* @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
||||
* @param [style.wordWrapWidth=100] {Number} The width at which text will wrap
|
||||
* @param [style.wordWrapWidth=100] {number} The width at which text will wrap
|
||||
*/
|
||||
PIXI.Text.prototype.setStyle = function(style)
|
||||
{
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
@class RenderTexture
|
||||
@extends Texture
|
||||
@constructor
|
||||
@param width {Number} The width of the render texture
|
||||
@param height {Number} The height of the render texture
|
||||
@param width {number} The width of the render texture
|
||||
@param height {number} The height of the render texture
|
||||
*/
|
||||
PIXI.RenderTexture = function(width, height)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
*
|
||||
* @method autoDetectRenderer
|
||||
* @static
|
||||
* @param width {Number} the width of the renderers view
|
||||
* @param height {Number} the height of the renderers view
|
||||
* @param width {number} the width of the renderers view
|
||||
* @param height {number} the height of the renderers view
|
||||
* @param view {Canvas} the canvas to use as a view, optional
|
||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
||||
* @param antialias=false {Boolean} sets antialias (only applicable in webGL chrome at the moment)
|
||||
|
|
|
@ -44,7 +44,7 @@ window.requestAnimFrame = window.requestAnimationFrame;
|
|||
* Converts a hex color number to an [R, G, B] array
|
||||
*
|
||||
* @method HEXtoRGB
|
||||
* @param hex {Number}
|
||||
* @param hex {number}
|
||||
*/
|
||||
function HEXtoRGB(hex) {
|
||||
return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @param {Phaser.Game} game - Reference to the current game instance.
|
||||
* @param {string} key - Asset key for the sound.
|
||||
* @param {number} volume - Default value for the volume.
|
||||
* @param {bool} loop - Whether or not the sound will loop.
|
||||
* @param {boolean} loop - Whether or not the sound will loop.
|
||||
*/
|
||||
Phaser.Sound = function (game, key, volume, loop) {
|
||||
|
||||
|
@ -43,7 +43,7 @@ Phaser.Sound = function (game, key, volume, loop) {
|
|||
|
||||
/**
|
||||
* Whether or not the sound will loop.
|
||||
* @property {bool} loop
|
||||
* @property {boolean} loop
|
||||
*/
|
||||
this.loop = loop;
|
||||
|
||||
|
@ -77,7 +77,7 @@ Phaser.Sound = function (game, key, volume, loop) {
|
|||
|
||||
/**
|
||||
* Boolean indicating whether the game is on "mute".
|
||||
* @property {bool} _muted
|
||||
* @property {boolean} _muted
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -85,7 +85,7 @@ Phaser.Sound = function (game, key, volume, loop) {
|
|||
|
||||
/**
|
||||
* Boolean indicating whether the sound should start automatically.
|
||||
* @property {bool} autoplay
|
||||
* @property {boolean} autoplay
|
||||
* @private
|
||||
*/
|
||||
this.autoplay = false;
|
||||
|
@ -127,14 +127,14 @@ Phaser.Sound = function (game, key, volume, loop) {
|
|||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} paused
|
||||
* @property {boolean} paused
|
||||
* @default
|
||||
*/
|
||||
this.paused = false;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} isPlaying
|
||||
* @property {boolean} isPlaying
|
||||
* @default
|
||||
*/
|
||||
this.isPlaying = false;
|
||||
|
@ -148,21 +148,21 @@ Phaser.Sound = function (game, key, volume, loop) {
|
|||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} pendingPlayback
|
||||
* @property {boolean} pendingPlayback
|
||||
* @default
|
||||
*/
|
||||
this.pendingPlayback = false;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} override
|
||||
* @property {boolean} override
|
||||
* @default
|
||||
*/
|
||||
this.override = false;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} usingWebAudio
|
||||
* @property {boolean} usingWebAudio
|
||||
*/
|
||||
this.usingWebAudio = this.game.sound.usingWebAudio;
|
||||
|
||||
|
@ -396,7 +396,7 @@ Phaser.Sound.prototype = {
|
|||
* @param {string} marker - Assets key of the sound you want to play.
|
||||
* @param {number} position - The starting position.
|
||||
* @param {number} [volume] - Volume of the sound you want to play.
|
||||
* @param {bool} [loop] - Loop when it finished playing? (Default to false)
|
||||
* @param {boolean} [loop] - Loop when it finished playing? (Default to false)
|
||||
* @param {Description} forceRestart - Description.
|
||||
* @return {Sound} The playing sound object.
|
||||
*/
|
||||
|
@ -593,7 +593,7 @@ Phaser.Sound.prototype = {
|
|||
* @param {string} marker - Assets key of the sound you want to play.
|
||||
* @param {number} position - The starting position.
|
||||
* @param {number} [volume] - Volume of the sound you want to play.
|
||||
* @param {bool} [loop] - Loop when it finished playing? (Default to false)
|
||||
* @param {boolean} [loop] - Loop when it finished playing? (Default to false)
|
||||
*/
|
||||
restart: function (marker, position, volume, loop) {
|
||||
|
||||
|
@ -691,7 +691,7 @@ Phaser.Sound.prototype = {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Sound.prototype, "isDecoding", {
|
||||
|
||||
|
@ -703,7 +703,7 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Sound.prototype, "isDecoded", {
|
||||
|
||||
|
@ -715,10 +715,10 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool} Whether or not the sound is muted.
|
||||
* @return {boolean} Whether or not the sound is muted.
|
||||
*//**
|
||||
* Mutes sound.
|
||||
* @param {bool} value - Whether or not the sound is muted.
|
||||
* @param {boolean} value - Whether or not the sound is muted.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Sound.prototype, "mute", {
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Phaser.SoundManager = function (game) {
|
|||
this.onSoundDecode = new Phaser.Signal;
|
||||
|
||||
/**
|
||||
* @property {bool} _muted - Description.
|
||||
* @property {boolean} _muted - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -61,25 +61,25 @@ Phaser.SoundManager = function (game) {
|
|||
this.context = null;
|
||||
|
||||
/**
|
||||
* @property {bool} usingWebAudio - Description.
|
||||
* @property {boolean} usingWebAudio - Description.
|
||||
* @default
|
||||
*/
|
||||
this.usingWebAudio = true;
|
||||
|
||||
/**
|
||||
* @property {bool} usingAudioTag - Description.
|
||||
* @property {boolean} usingAudioTag - Description.
|
||||
* @default
|
||||
*/
|
||||
this.usingAudioTag = false;
|
||||
|
||||
/**
|
||||
* @property {bool} noAudio - Description.
|
||||
* @property {boolean} noAudio - Description.
|
||||
* @default
|
||||
*/
|
||||
this.noAudio = false;
|
||||
|
||||
/**
|
||||
* @property {bool} touchLocked - Description.
|
||||
* @property {boolean} touchLocked - Description.
|
||||
* @default
|
||||
*/
|
||||
this.touchLocked = false;
|
||||
|
@ -323,7 +323,7 @@ Phaser.SoundManager.prototype = {
|
|||
* @method add
|
||||
* @param {string} key - Asset key for the sound.
|
||||
* @param {number} volume - Default value for the volume.
|
||||
* @param {bool} loop - Whether or not the sound will loop.
|
||||
* @param {boolean} loop - Whether or not the sound will loop.
|
||||
*/
|
||||
add: function (key, volume, loop) {
|
||||
|
||||
|
@ -344,10 +344,10 @@ Phaser.SoundManager.prototype = {
|
|||
|
||||
/**
|
||||
* A global audio mute toggle.
|
||||
* @return {bool} Whether or not the game is on "mute".
|
||||
* @return {boolean} Whether or not the game is on "mute".
|
||||
*//**
|
||||
* Mute sounds.
|
||||
* @param {bool} value - Whether or not the game is on "mute"
|
||||
* @param {boolean} value - Whether or not the game is on "mute"
|
||||
*/
|
||||
Object.defineProperty(Phaser.SoundManager.prototype, "mute", {
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ Phaser.Canvas = {
|
|||
* @method addToDOM
|
||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
||||
* @param {string} parent - The DOM element to add the canvas to. Defaults to ''.
|
||||
* @param {bool} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element.
|
||||
* @param {boolean} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element.
|
||||
* @return {HTMLCanvasElement} Returns the source canvas.
|
||||
*/
|
||||
addToDOM: function (canvas, parent, overflowHidden) {
|
||||
|
@ -191,7 +191,7 @@ Phaser.Canvas = {
|
|||
*
|
||||
* @method setSmoothingEnabled
|
||||
* @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on.
|
||||
* @param {bool} value - If set to true it will enable image smoothing, false will disable it.
|
||||
* @param {boolean} value - If set to true it will enable image smoothing, false will disable it.
|
||||
* @return {CanvasRenderingContext2D} Returns the source context.
|
||||
*/
|
||||
setSmoothingEnabled: function (context, value) {
|
||||
|
|
|
@ -19,7 +19,7 @@ Phaser.Device = function () {
|
|||
/**
|
||||
* An optional 'fix' for the horrendous Android stock browser bug
|
||||
* {@link https://code.google.com/p/android/issues/detail?id=39247}
|
||||
* @property {bool} patchAndroidClearRectBug - Description.
|
||||
* @property {boolean} patchAndroidClearRectBug - Description.
|
||||
* @default
|
||||
*/
|
||||
this.patchAndroidClearRectBug = false;
|
||||
|
@ -27,43 +27,43 @@ Phaser.Device = function () {
|
|||
// Operating System
|
||||
|
||||
/**
|
||||
* @property {bool} desktop - Is running desktop?
|
||||
* @property {boolean} desktop - Is running desktop?
|
||||
* @default
|
||||
*/
|
||||
this.desktop = false;
|
||||
|
||||
/**
|
||||
* @property {bool} iOS - Is running on iOS?
|
||||
* @property {boolean} iOS - Is running on iOS?
|
||||
* @default
|
||||
*/
|
||||
this.iOS = false;
|
||||
|
||||
/**
|
||||
* @property {bool} android - Is running on android?
|
||||
* @property {boolean} android - Is running on android?
|
||||
* @default
|
||||
*/
|
||||
this.android = false;
|
||||
|
||||
/**
|
||||
* @property {bool} chromeOS - Is running on chromeOS?
|
||||
* @property {boolean} chromeOS - Is running on chromeOS?
|
||||
* @default
|
||||
*/
|
||||
this.chromeOS = false;
|
||||
|
||||
/**
|
||||
* @property {bool} linux - Is running on linux?
|
||||
* @property {boolean} linux - Is running on linux?
|
||||
* @default
|
||||
*/
|
||||
this.linux = false;
|
||||
|
||||
/**
|
||||
* @property {bool} maxOS - Is running on maxOS?
|
||||
* @property {boolean} maxOS - Is running on maxOS?
|
||||
* @default
|
||||
*/
|
||||
this.macOS = false;
|
||||
|
||||
/**
|
||||
* @property {bool} windows - Is running on windows?
|
||||
* @property {boolean} windows - Is running on windows?
|
||||
* @default
|
||||
*/
|
||||
this.windows = false;
|
||||
|
@ -71,61 +71,61 @@ Phaser.Device = function () {
|
|||
// Features
|
||||
|
||||
/**
|
||||
* @property {bool} canvas - Is canvas available?
|
||||
* @property {boolean} canvas - Is canvas available?
|
||||
* @default
|
||||
*/
|
||||
this.canvas = false;
|
||||
|
||||
/**
|
||||
* @property {bool} file - Is file available?
|
||||
* @property {boolean} file - Is file available?
|
||||
* @default
|
||||
*/
|
||||
this.file = false;
|
||||
|
||||
/**
|
||||
* @property {bool} fileSystem - Is fileSystem available?
|
||||
* @property {boolean} fileSystem - Is fileSystem available?
|
||||
* @default
|
||||
*/
|
||||
this.fileSystem = false;
|
||||
|
||||
/**
|
||||
* @property {bool} localStorage - Is localStorage available?
|
||||
* @property {boolean} localStorage - Is localStorage available?
|
||||
* @default
|
||||
*/
|
||||
this.localStorage = false;
|
||||
|
||||
/**
|
||||
* @property {bool} webGL - Is webGL available?
|
||||
* @property {boolean} webGL - Is webGL available?
|
||||
* @default
|
||||
*/
|
||||
this.webGL = false;
|
||||
|
||||
/**
|
||||
* @property {bool} worker - Is worker available?
|
||||
* @property {boolean} worker - Is worker available?
|
||||
* @default
|
||||
*/
|
||||
this.worker = false;
|
||||
|
||||
/**
|
||||
* @property {bool} touch - Is touch available?
|
||||
* @property {boolean} touch - Is touch available?
|
||||
* @default
|
||||
*/
|
||||
this.touch = false;
|
||||
|
||||
/**
|
||||
* @property {bool} mspointer - Is mspointer available?
|
||||
* @property {boolean} mspointer - Is mspointer available?
|
||||
* @default
|
||||
*/
|
||||
this.mspointer = false;
|
||||
|
||||
/**
|
||||
* @property {bool} css3D - Is css3D available?
|
||||
* @property {boolean} css3D - Is css3D available?
|
||||
* @default
|
||||
*/
|
||||
this.css3D = false;
|
||||
|
||||
/**
|
||||
* @property {bool} pointerLock - Is Pointer Lock available?
|
||||
* @property {boolean} pointerLock - Is Pointer Lock available?
|
||||
* @default
|
||||
*/
|
||||
this.pointerLock = false;
|
||||
|
@ -133,31 +133,31 @@ Phaser.Device = function () {
|
|||
// Browser
|
||||
|
||||
/**
|
||||
* @property {bool} arora - Is running in arora?
|
||||
* @property {boolean} arora - Is running in arora?
|
||||
* @default
|
||||
*/
|
||||
this.arora = false;
|
||||
|
||||
/**
|
||||
* @property {bool} chrome - Is running in chrome?
|
||||
* @property {boolean} chrome - Is running in chrome?
|
||||
* @default
|
||||
*/
|
||||
this.chrome = false;
|
||||
|
||||
/**
|
||||
* @property {bool} epiphany - Is running in epiphany?
|
||||
* @property {boolean} epiphany - Is running in epiphany?
|
||||
* @default
|
||||
*/
|
||||
this.epiphany = false;
|
||||
|
||||
/**
|
||||
* @property {bool} firefox - Is running in firefox?
|
||||
* @property {boolean} firefox - Is running in firefox?
|
||||
* @default
|
||||
*/
|
||||
this.firefox = false;
|
||||
|
||||
/**
|
||||
* @property {bool} ie - Is running in ie?
|
||||
* @property {boolean} ie - Is running in ie?
|
||||
* @default
|
||||
*/
|
||||
this.ie = false;
|
||||
|
@ -169,25 +169,25 @@ Phaser.Device = function () {
|
|||
this.ieVersion = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} mobileSafari - Is running in mobileSafari?
|
||||
* @property {boolean} mobileSafari - Is running in mobileSafari?
|
||||
* @default
|
||||
*/
|
||||
this.mobileSafari = false;
|
||||
|
||||
/**
|
||||
* @property {bool} midori - Is running in midori?
|
||||
* @property {boolean} midori - Is running in midori?
|
||||
* @default
|
||||
*/
|
||||
this.midori = false;
|
||||
|
||||
/**
|
||||
* @property {bool} opera - Is running in opera?
|
||||
* @property {boolean} opera - Is running in opera?
|
||||
* @default
|
||||
*/
|
||||
this.opera = false;
|
||||
|
||||
/**
|
||||
* @property {bool} safari - Is running in safari?
|
||||
* @property {boolean} safari - Is running in safari?
|
||||
* @default
|
||||
*/
|
||||
this.safari = false;
|
||||
|
@ -196,49 +196,49 @@ Phaser.Device = function () {
|
|||
// Audio
|
||||
|
||||
/**
|
||||
* @property {bool} audioData - Are Audio tags available?
|
||||
* @property {boolean} audioData - Are Audio tags available?
|
||||
* @default
|
||||
*/
|
||||
this.audioData = false;
|
||||
|
||||
/**
|
||||
* @property {bool} webAudio - Is the WebAudio API available?
|
||||
* @property {boolean} webAudio - Is the WebAudio API available?
|
||||
* @default
|
||||
*/
|
||||
this.webAudio = false;
|
||||
|
||||
/**
|
||||
* @property {bool} ogg - Can this device play ogg files?
|
||||
* @property {boolean} ogg - Can this device play ogg files?
|
||||
* @default
|
||||
*/
|
||||
this.ogg = false;
|
||||
|
||||
/**
|
||||
* @property {bool} opus - Can this device play opus files?
|
||||
* @property {boolean} opus - Can this device play opus files?
|
||||
* @default
|
||||
*/
|
||||
this.opus = false;
|
||||
|
||||
/**
|
||||
* @property {bool} mp3 - Can this device play mp3 files?
|
||||
* @property {boolean} mp3 - Can this device play mp3 files?
|
||||
* @default
|
||||
*/
|
||||
this.mp3 = false;
|
||||
|
||||
/**
|
||||
* @property {bool} wav - Can this device play wav files?
|
||||
* @property {boolean} wav - Can this device play wav files?
|
||||
* @default
|
||||
*/
|
||||
this.wav = false;
|
||||
/**
|
||||
* Can this device play m4a files?
|
||||
* @property {bool} m4a - True if this device can play m4a files.
|
||||
* @property {boolean} m4a - True if this device can play m4a files.
|
||||
* @default
|
||||
*/
|
||||
this.m4a = false;
|
||||
|
||||
/**
|
||||
* @property {bool} webm - Can this device play webm files?
|
||||
* @property {boolean} webm - Can this device play webm files?
|
||||
* @default
|
||||
*/
|
||||
this.webm = false;
|
||||
|
@ -246,19 +246,19 @@ Phaser.Device = function () {
|
|||
// Device
|
||||
|
||||
/**
|
||||
* @property {bool} iPhone - Is running on iPhone?
|
||||
* @property {boolean} iPhone - Is running on iPhone?
|
||||
* @default
|
||||
*/
|
||||
this.iPhone = false;
|
||||
|
||||
/**
|
||||
* @property {bool} iPhone4 - Is running on iPhone4?
|
||||
* @property {boolean} iPhone4 - Is running on iPhone4?
|
||||
* @default
|
||||
*/
|
||||
this.iPhone4 = false;
|
||||
|
||||
/**
|
||||
* @property {bool} iPad - Is running on iPad?
|
||||
* @property {boolean} iPad - Is running on iPad?
|
||||
* @default
|
||||
*/
|
||||
this.iPad = false;
|
||||
|
@ -496,7 +496,7 @@ Phaser.Device.prototype = {
|
|||
/**
|
||||
* Check whether the console is open.
|
||||
* @method isConsoleOpen
|
||||
* @return {bool} True if console is open.
|
||||
* @return {boolean} True if console is open.
|
||||
*/
|
||||
|
||||
isConsoleOpen: function () {
|
||||
|
|
|
@ -21,13 +21,13 @@ Phaser.RequestAnimationFrame = function(game) {
|
|||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {bool} _isSetTimeOut - Description.
|
||||
* @property {boolean} _isSetTimeOut - Description.
|
||||
* @private
|
||||
*/
|
||||
this._isSetTimeOut = false;
|
||||
|
||||
/**
|
||||
* @property {bool} isRunning - Description.
|
||||
* @property {boolean} isRunning - Description.
|
||||
* @default
|
||||
*/
|
||||
this.isRunning = false;
|
||||
|
@ -135,7 +135,7 @@ Phaser.RequestAnimationFrame.prototype = {
|
|||
/**
|
||||
* Is the browser using setTimeout?
|
||||
* @method isSetTimeOut
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
**/
|
||||
isSetTimeOut: function () {
|
||||
return this._isSetTimeOut;
|
||||
|
@ -144,7 +144,7 @@ Phaser.RequestAnimationFrame.prototype = {
|
|||
/**
|
||||
* Is the browser using requestAnimationFrame?
|
||||
* @method isRAF
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
**/
|
||||
isRAF: function () {
|
||||
return (this._isSetTimeOut === false);
|
||||
|
|
|
@ -25,25 +25,25 @@ Phaser.StageScaleMode = function (game, width, height) {
|
|||
this._startHeight = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage
|
||||
* @property {boolean} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage
|
||||
* @default
|
||||
*/
|
||||
this.forceLandscape = false;
|
||||
|
||||
/**
|
||||
* @property {bool} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage
|
||||
* @property {boolean} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage
|
||||
* @default
|
||||
*/
|
||||
this.forcePortrait = false;
|
||||
|
||||
/**
|
||||
* @property {bool} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true.
|
||||
* @property {boolean} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true.
|
||||
* @default
|
||||
*/
|
||||
this.incorrectOrientation = false;
|
||||
|
||||
/**
|
||||
* @property {bool} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true.
|
||||
* @property {boolean} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true.
|
||||
<ul><li>It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.</li>
|
||||
<li>It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.</li></ul>
|
||||
* @default
|
||||
|
@ -51,7 +51,7 @@ Phaser.StageScaleMode = function (game, width, height) {
|
|||
this.pageAlignHorizontally = false;
|
||||
|
||||
/**
|
||||
* @property {bool} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true.
|
||||
* @property {boolean} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true.
|
||||
<ul><li>It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
|
||||
<li>It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.</li></ul>
|
||||
* @default
|
||||
|
@ -511,7 +511,7 @@ Phaser.StageScaleMode.prototype = {
|
|||
|
||||
/**
|
||||
* Get
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", {
|
||||
|
||||
|
|
|
@ -27,43 +27,43 @@ Phaser.Tile = function (game, tilemap, index, width, height) {
|
|||
this.mass = 1.0;
|
||||
|
||||
/**
|
||||
* @property {bool} collideNone - Indicating this Tile doesn't collide at all.
|
||||
* @property {boolean} collideNone - Indicating this Tile doesn't collide at all.
|
||||
* @default
|
||||
*/
|
||||
this.collideNone = true;
|
||||
|
||||
/**
|
||||
* @property {bool} collideLeft - Indicating collide with any object on the left.
|
||||
* @property {boolean} collideLeft - Indicating collide with any object on the left.
|
||||
* @default
|
||||
*/
|
||||
this.collideLeft = false;
|
||||
|
||||
/**
|
||||
* @property {bool} collideRight - Indicating collide with any object on the right.
|
||||
* @property {boolean} collideRight - Indicating collide with any object on the right.
|
||||
* @default
|
||||
*/
|
||||
this.collideRight = false;
|
||||
|
||||
/**
|
||||
* @property {bool} collideUp - Indicating collide with any object on the top.
|
||||
* @property {boolean} collideUp - Indicating collide with any object on the top.
|
||||
* @default
|
||||
*/
|
||||
this.collideUp = false;
|
||||
|
||||
/**
|
||||
* @property {bool} collideDown - Indicating collide with any object on the bottom.
|
||||
* @property {boolean} collideDown - Indicating collide with any object on the bottom.
|
||||
* @default
|
||||
*/
|
||||
this.collideDown = false;
|
||||
|
||||
/**
|
||||
* @property {bool} separateX - Enable separation at x-axis.
|
||||
* @property {boolean} separateX - Enable separation at x-axis.
|
||||
* @default
|
||||
*/
|
||||
this.separateX = true;
|
||||
|
||||
/**
|
||||
* @property {bool} separateY - Enable separation at y-axis.
|
||||
* @property {boolean} separateY - Enable separation at y-axis.
|
||||
* @default
|
||||
*/
|
||||
this.separateY = true;
|
||||
|
@ -74,7 +74,7 @@ Phaser.Tile = function (game, tilemap, index, width, height) {
|
|||
this.game = game;
|
||||
|
||||
/**
|
||||
* @property {bool} tilemap - The tilemap this tile belongs to.
|
||||
* @property {boolean} tilemap - The tilemap this tile belongs to.
|
||||
*/
|
||||
this.tilemap = tilemap;
|
||||
|
||||
|
@ -108,13 +108,13 @@ Phaser.Tile.prototype = {
|
|||
/**
|
||||
* Set collision configs.
|
||||
* @method setCollision
|
||||
* @param {bool} left - Indicating collide with any object on the left.
|
||||
* @param {bool} right - Indicating collide with any object on the right.
|
||||
* @param {bool} up - Indicating collide with any object on the top.
|
||||
* @param {bool} down - Indicating collide with any object on the bottom.
|
||||
* @param {bool} reset - Description.
|
||||
* @param {bool} separateX - Separate at x-axis.
|
||||
* @param {bool} separateY - Separate at y-axis.
|
||||
* @param {boolean} left - Indicating collide with any object on the left.
|
||||
* @param {boolean} right - Indicating collide with any object on the right.
|
||||
* @param {boolean} up - Indicating collide with any object on the top.
|
||||
* @param {boolean} down - Indicating collide with any object on the bottom.
|
||||
* @param {boolean} reset - Description.
|
||||
* @param {boolean} separateX - Separate at x-axis.
|
||||
* @param {boolean} separateY - Separate at y-axis.
|
||||
*/
|
||||
setCollision: function (left, right, up, down, reset, separateX, separateY) {
|
||||
|
||||
|
@ -160,7 +160,7 @@ Object.defineProperty(Phaser.Tile.prototype, "bottom", {
|
|||
/**
|
||||
* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
|
||||
* @method bottom
|
||||
* @return {Number}
|
||||
* @return {number}
|
||||
**/
|
||||
get: function () {
|
||||
return this.y + this.height;
|
||||
|
@ -174,7 +174,7 @@ Object.defineProperty(Phaser.Tile.prototype, "right", {
|
|||
* The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties.
|
||||
* However it does affect the width property.
|
||||
* @method right
|
||||
* @return {Number}
|
||||
* @return {number}
|
||||
**/
|
||||
get: function () {
|
||||
return this.x + this.width;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* @param {string} key - Asset key for this map.
|
||||
* @param {object} x - Description.
|
||||
* @param {object} y - Description.
|
||||
* @param {bool} resizeWorld - Resize the world bound automatically based on this tilemap?
|
||||
* @param {boolean} resizeWorld - Resize the world bound automatically based on this tilemap?
|
||||
* @param {number} tileWidth - Width of tiles in this map (used for CSV maps).
|
||||
* @param {number} tileHeight - Height of tiles in this map (used for CSV maps).
|
||||
*/
|
||||
|
@ -54,31 +54,31 @@ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight)
|
|||
this.renderOrderID = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} collisionCallback - Tilemap collision callback.
|
||||
* @property {boolean} collisionCallback - Tilemap collision callback.
|
||||
* @default
|
||||
*/
|
||||
this.collisionCallback = null;
|
||||
|
||||
/**
|
||||
* @property {bool} exists - Description.
|
||||
* @property {boolean} exists - Description.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {bool} visible - Description.
|
||||
* @property {boolean} visible - Description.
|
||||
* @default
|
||||
*/
|
||||
this.visible = true;
|
||||
|
||||
/**
|
||||
* @property {bool} tiles - Description.
|
||||
* @property {boolean} tiles - Description.
|
||||
* @default
|
||||
*/
|
||||
this.tiles = [];
|
||||
|
||||
/**
|
||||
* @property {bool} layers - Description.
|
||||
* @property {boolean} layers - Description.
|
||||
* @default
|
||||
*/
|
||||
this.layers = [];
|
||||
|
@ -268,9 +268,9 @@ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) {
|
|||
* @param {number} start - First index of tiles.
|
||||
* @param {number} end - Last index of tiles.
|
||||
* @param {number} collision - Bit field of flags. (see Tile.allowCollision)
|
||||
* @param {bool} resetCollisions - Reset collision flags before set.
|
||||
* @param {bool} separateX - Enable separate at x-axis.
|
||||
* @param {bool} separateY - Enable separate at y-axis.
|
||||
* @param {boolean} resetCollisions - Reset collision flags before set.
|
||||
* @param {boolean} separateX - Enable separate at x-axis.
|
||||
* @param {boolean} separateY - Enable separate at y-axis.
|
||||
*/
|
||||
Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) {
|
||||
|
||||
|
@ -289,13 +289,13 @@ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right,
|
|||
* Set collision configs of tiles with given index.
|
||||
* @param {number[]} values - Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters.
|
||||
* @param {number} collision - Bit field of flags (see Tile.allowCollision).
|
||||
* @param {bool} resetCollisions - Reset collision flags before set.
|
||||
* @param {bool} left - Indicating collide with any object on the left.
|
||||
* @param {bool} right - Indicating collide with any object on the right.
|
||||
* @param {bool} up - Indicating collide with any object on the top.
|
||||
* @param {bool} down - Indicating collide with any object on the bottom.
|
||||
* @param {bool} separateX - Enable separate at x-axis.
|
||||
* @param {bool} separateY - Enable separate at y-axis.
|
||||
* @param {boolean} resetCollisions - Reset collision flags before set.
|
||||
* @param {boolean} left - Indicating collide with any object on the left.
|
||||
* @param {boolean} right - Indicating collide with any object on the right.
|
||||
* @param {boolean} up - Indicating collide with any object on the top.
|
||||
* @param {boolean} down - Indicating collide with any object on the bottom.
|
||||
* @param {boolean} separateX - Enable separate at x-axis.
|
||||
* @param {boolean} separateY - Enable separate at y-axis.
|
||||
*/
|
||||
Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) {
|
||||
|
||||
|
@ -389,7 +389,7 @@ Phaser.Tilemap.prototype.getTileOverlaps = function (object) {
|
|||
* @param {Function} objectOrGroup - Target object of group you want to check.
|
||||
* @param {Function} callback - This is called if objectOrGroup collides the tilemap.
|
||||
* @param {object} context - Callback will be called with this context.
|
||||
* @return {bool} Return true if this collides with given object, otherwise return false.
|
||||
* @return {boolean} Return true if this collides with given object, otherwise return false.
|
||||
*/
|
||||
Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) {
|
||||
|
||||
|
@ -417,7 +417,7 @@ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) {
|
|||
/**
|
||||
* Check whether this tilemap collides with the given game object.
|
||||
* @param {GameObject} object - Target object you want to check.
|
||||
* @return {bool} Return true if this collides with given object, otherwise return false.
|
||||
* @return {boolean} Return true if this collides with given object, otherwise return false.
|
||||
*/
|
||||
Phaser.Tilemap.prototype.collideGameObject = function (object) {
|
||||
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) {
|
||||
|
||||
/**
|
||||
* @property {bool} exists - Controls whether update() and draw() are automatically called.
|
||||
* @property {boolean} exists - Controls whether update() and draw() are automatically called.
|
||||
* @default
|
||||
*/
|
||||
this.exists = true;
|
||||
|
||||
/**
|
||||
* @property {bool} visible - Controls whether draw() are automatically called.
|
||||
* @property {boolean} visible - Controls whether draw() are automatically called.
|
||||
* @default
|
||||
*/
|
||||
this.visible = true;
|
||||
|
@ -444,7 +444,7 @@ Phaser.TilemapLayer.prototype = {
|
|||
* @param {number} [y] - Y position (in tiles) of block's left-top corner.
|
||||
* @param {number} [width] - width of block.
|
||||
* @param {number} [height] - height of block.
|
||||
* @param {bool} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE).
|
||||
* @param {boolean} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE).
|
||||
*/
|
||||
getTempBlock: function (x, y, width, height, collisionOnly) {
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ Phaser.TilemapRenderer.prototype = {
|
|||
* Render a tilemap to a canvas.
|
||||
* @method render
|
||||
* @param tilemap {Tilemap} The tilemap data to render.
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
render: function (tilemap) {
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ Phaser.Time = function (game) {
|
|||
|
||||
/**
|
||||
* Description.
|
||||
* @property {bool} _justResumed
|
||||
* @property {boolean} _justResumed
|
||||
* @default
|
||||
*/
|
||||
this._justResumed = false;
|
||||
|
|
|
@ -67,14 +67,14 @@ Phaser.Tween = function (object, game) {
|
|||
this._repeat = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} _yoyo - Description.
|
||||
* @property {boolean} _yoyo - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
this._yoyo = false;
|
||||
|
||||
/**
|
||||
* @property {bool} _reversed - Description.
|
||||
* @property {boolean} _reversed - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -120,7 +120,7 @@ Phaser.Tween = function (object, game) {
|
|||
this._onStartCallback = null;
|
||||
|
||||
/**
|
||||
* @property {bool} _onStartCallbackFired - Description.
|
||||
* @property {boolean} _onStartCallbackFired - Description.
|
||||
* @private
|
||||
* @default
|
||||
*/
|
||||
|
@ -148,7 +148,7 @@ Phaser.Tween = function (object, game) {
|
|||
this._pausedTime = 0;
|
||||
|
||||
/**
|
||||
* @property {bool} pendingDelete - Description.
|
||||
* @property {boolean} pendingDelete - Description.
|
||||
* @default
|
||||
*/
|
||||
this.pendingDelete = false;
|
||||
|
@ -169,7 +169,7 @@ Phaser.Tween = function (object, game) {
|
|||
this.onComplete = new Phaser.Signal();
|
||||
|
||||
/**
|
||||
* @property {bool} isRunning - Description.
|
||||
* @property {boolean} isRunning - Description.
|
||||
* @default
|
||||
*/
|
||||
this.isRunning = false;
|
||||
|
@ -185,9 +185,9 @@ Phaser.Tween.prototype = {
|
|||
* @param {object} properties - Properties you want to tween.
|
||||
* @param {number} duration - Duration of this tween.
|
||||
* @param {function} ease - Easing function.
|
||||
* @param {bool} autoStart - Whether this tween will start automatically or not.
|
||||
* @param {boolean} autoStart - Whether this tween will start automatically or not.
|
||||
* @param {number} delay - Delay before this tween will start, defaults to 0 (no delay).
|
||||
* @param {bool} repeat - Should the tween automatically restart once complete? (ignores any chained tweens).
|
||||
* @param {boolean} repeat - Should the tween automatically restart once complete? (ignores any chained tweens).
|
||||
* @param {Phaser.Tween} yoyo - Description.
|
||||
* @return {Phaser.Tween} Itself.
|
||||
*/
|
||||
|
@ -471,7 +471,7 @@ Phaser.Tween.prototype = {
|
|||
*
|
||||
* @method update
|
||||
* @param {number} time - Description.
|
||||
* @return {bool} Description.
|
||||
* @return {boolean} Description.
|
||||
*/
|
||||
update: function ( time ) {
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ Phaser.TweenManager.prototype = {
|
|||
* Update all the tween objects you added to this manager.
|
||||
*
|
||||
* @method update
|
||||
* @returns {bool} Return false if there's no tween to update, otherwise return true.
|
||||
* @returns {boolean} Return false if there's no tween to update, otherwise return true.
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Phaser.Utils.Debug = function (game) {
|
|||
this.lineHeight = 16;
|
||||
|
||||
/**
|
||||
* @property {bool} renderShadow - Description.
|
||||
* @property {boolean} renderShadow - Description.
|
||||
*/
|
||||
this.renderShadow = true;
|
||||
|
||||
|
@ -185,8 +185,8 @@ Phaser.Utils.Debug.prototype = {
|
|||
* Description.
|
||||
* @method renderSpriteCorners
|
||||
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
|
||||
* @param {bool} showText - Description.
|
||||
* @param {bool} showBounds - Description.
|
||||
* @param {boolean} showText - Description.
|
||||
* @param {boolean} showBounds - Description.
|
||||
* @param {string} color - Description.
|
||||
*/
|
||||
renderSpriteCorners: function (sprite, showText, showBounds, color) {
|
||||
|
@ -302,7 +302,7 @@ Phaser.Utils.Debug.prototype = {
|
|||
* Renders the Pointer.circle object onto the stage in green if down or red if up.
|
||||
* @method renderDebug
|
||||
* @param {Description} pointer - Description.
|
||||
* @param {bool} hideIfUp - Description.
|
||||
* @param {boolean} hideIfUp - Description.
|
||||
* @param {string} downColor - Description.
|
||||
* @param {string} upColor - Description.
|
||||
* @param {string} color - Description.
|
||||
|
|
|
@ -57,7 +57,7 @@ Phaser.Utils = {
|
|||
* This is a slightly modified version of jQuery.isPlainObject.
|
||||
* @method isPlainObject
|
||||
* @param {object} obj - Description.
|
||||
* @return {bool} - Description.
|
||||
* @return {boolean} - Description.
|
||||
*/
|
||||
isPlainObject: function (obj) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue