mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +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
|
"allowUnknownTags": true
|
||||||
},
|
},
|
||||||
"source": {
|
"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": [],
|
"exclude": [],
|
||||||
"includePattern": ".+\\.js(doc)?$",
|
"includePattern": ".+\\.js(doc)?$",
|
||||||
"excludePattern": "(^|\\/|\\\\)_"
|
"excludePattern": "(^|\\/|\\\\)_"
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<td class="type">
|
<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">
|
<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">
|
<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">
|
<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>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<script> prettyPrint(); </script>
|
||||||
|
|
|
@ -120,13 +120,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<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>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<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>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<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>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<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>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<script> prettyPrint(); </script>
|
||||||
|
|
|
@ -105,13 +105,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<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>
|
</nav>
|
||||||
|
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
|
|
||||||
<footer>
|
<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>
|
</footer>
|
||||||
|
|
||||||
<script> prettyPrint(); </script>
|
<script> prettyPrint(); </script>
|
||||||
|
|
|
@ -65,6 +65,7 @@ Phaser.AnimationManager.prototype = {
|
||||||
* This is called automatically when a new Sprite is created.
|
* This is called automatically when a new Sprite is created.
|
||||||
*
|
*
|
||||||
* @method loadFrameData
|
* @method loadFrameData
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @private
|
* @private
|
||||||
* @param {Phaser.Animation.FrameData} frameData - The FrameData set to load.
|
* @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.
|
* Animations added in this way are played back with the play function.
|
||||||
*
|
*
|
||||||
* @method add
|
* @method add
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
|
* @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 {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.
|
* @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.
|
* Check whether the frames in the given array are valid and exist.
|
||||||
*
|
*
|
||||||
* @method validateFrames
|
* @method validateFrames
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @param {Array} frames - An array of frames to be validated.
|
* @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)
|
* @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.
|
* @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.
|
* 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
|
* @method play
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
|
* @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.
|
* @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.
|
* The currentAnim property of the AnimationManager is automatically set to the animation given.
|
||||||
*
|
*
|
||||||
* @method stop
|
* @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 {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)
|
* @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.
|
* The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.
|
||||||
*
|
*
|
||||||
* @method update
|
* @method update
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @protected
|
* @protected
|
||||||
* @return {boolean} True if a new animation frame has been set, otherwise false.
|
* @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.
|
* Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation.
|
||||||
*
|
*
|
||||||
* @method destroy
|
* @method destroy
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
*/
|
*/
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
|
|
||||||
|
@ -258,6 +265,7 @@ Phaser.AnimationManager.prototype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation.
|
* @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", {
|
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.
|
* @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", {
|
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.
|
* @return {boolean} Returns the paused state of the current animation.
|
||||||
*//**
|
*//**
|
||||||
|
* @memberof Phaser.AnimationManager
|
||||||
* @param {boolean} value - Sets the paused state of the current animation.
|
* @param {boolean} value - Sets the paused state of the current animation.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.AnimationManager.prototype, "paused", {
|
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.
|
* @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.
|
* @param {number} value - Sets the current frame on the Sprite and updates the texture cache for display.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frame", {
|
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.
|
* @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.
|
* @param {string} value - Sets the current frame on the Sprite and updates the texture cache for display.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", {
|
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);
|
this.distance = Phaser.Math.distance(0, 0, width, height);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} rotated - Rotated? (not yet implemented)
|
* @property {boolean} rotated - Rotated? (not yet implemented)
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.rotated = false;
|
this.rotated = false;
|
||||||
|
@ -83,7 +83,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) {
|
||||||
this.rotationDirection = 'cw';
|
this.rotationDirection = 'cw';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} trimmed - Was it trimmed when packed?
|
* @property {boolean} trimmed - Was it trimmed when packed?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.trimmed = false;
|
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.
|
* If the frame was trimmed when added to the Texture Atlas this records the trim and source data.
|
||||||
*
|
*
|
||||||
* @method setTrim
|
* @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} actualWidth - The width of the frame before being trimmed.
|
||||||
* @param {number} actualHeight - The height 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.
|
* @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.
|
* Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.
|
||||||
*
|
*
|
||||||
* @method addFrame
|
* @method addFrame
|
||||||
|
* @memberof Phaser.Animation.FrameData
|
||||||
* @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set.
|
* @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set.
|
||||||
* @return {Phaser.Animation.Frame} The frame that was just added.
|
* @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.
|
* Get a Frame by its numerical index.
|
||||||
*
|
*
|
||||||
* @method getFrame
|
* @method getFrame
|
||||||
|
* @memberof Phaser.Animation.FrameData
|
||||||
* @param {number} index - The index of the frame you want to get.
|
* @param {number} index - The index of the frame you want to get.
|
||||||
* @return {Phaser.Animation.Frame} The frame, if found.
|
* @return {Phaser.Animation.Frame} The frame, if found.
|
||||||
*/
|
*/
|
||||||
|
@ -74,6 +76,7 @@ Phaser.Animation.FrameData.prototype = {
|
||||||
* Get a Frame by its frame name.
|
* Get a Frame by its frame name.
|
||||||
*
|
*
|
||||||
* @method getFrameByName
|
* @method getFrameByName
|
||||||
|
* @memberof Phaser.Animation.FrameData
|
||||||
* @param {string} name - The name of the frame you want to get.
|
* @param {string} name - The name of the frame you want to get.
|
||||||
* @return {Phaser.Animation.Frame} The frame, if found.
|
* @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.
|
* Check if there is a Frame with the given name.
|
||||||
*
|
*
|
||||||
* @method checkFrameName
|
* @method checkFrameName
|
||||||
|
* @memberof Phaser.Animation.FrameData
|
||||||
* @param {string} name - The name of the frame you want to check.
|
* @param {string} name - The name of the frame you want to check.
|
||||||
* @return {boolean} True if the frame is found, otherwise false.
|
* @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.
|
* Returns a range of frames based on the given start and end frame indexes and returns them in an Array.
|
||||||
*
|
*
|
||||||
* @method getFrameRange
|
* @method getFrameRange
|
||||||
|
* @memberof Phaser.Animation.FrameData
|
||||||
* @param {number} start - The starting frame index.
|
* @param {number} start - The starting frame index.
|
||||||
* @param {number} end - The ending 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.
|
* @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.
|
* The frames are returned in the output array, or if none is provided in a new Array object.
|
||||||
*
|
*
|
||||||
* @method getFrames
|
* @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 {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 {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.
|
* @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.
|
* The frames indexes are returned in the output array, or if none is provided in a new Array object.
|
||||||
*
|
*
|
||||||
* @method getFrameIndexes
|
* @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 {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 {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.
|
* @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.
|
* Returns the total number of frames in this FrameData set.
|
||||||
*
|
*
|
||||||
* @method total
|
* @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 () {
|
get: function () {
|
||||||
return this._frames.length;
|
return this._frames.length;
|
||||||
|
|
|
@ -16,6 +16,7 @@ Phaser.Animation.Parser = {
|
||||||
* Parse a Sprite Sheet and extract the animation frame data from it.
|
* Parse a Sprite Sheet and extract the animation frame data from it.
|
||||||
*
|
*
|
||||||
* @method spriteSheet
|
* @method spriteSheet
|
||||||
|
* @memberof Phaser.Animation.Parser
|
||||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
* @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 {string} key - The Game.Cache asset key of the Sprite Sheet image.
|
||||||
* @param {number} frameWidth - The fixed width of each frame of the animation.
|
* @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.
|
* Parse the JSON data and extract the animation frame data from it.
|
||||||
*
|
*
|
||||||
* @method JSONData
|
* @method JSONData
|
||||||
|
* @memberof Phaser.Animation.Parser
|
||||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
* @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 {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.
|
* @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.
|
* Parse the JSON data and extract the animation frame data from it.
|
||||||
*
|
*
|
||||||
* @method JSONDataHash
|
* @method JSONDataHash
|
||||||
|
* @memberof Phaser.Animation.Parser
|
||||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
* @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 {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.
|
* @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.
|
* Parse the XML data and extract the animation frame data from it.
|
||||||
*
|
*
|
||||||
* @method XMLData
|
* @method XMLData
|
||||||
|
* @memberof Phaser.Animation.Parser
|
||||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
* @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 {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.
|
* @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;
|
this.deadzone = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} visible - Whether this camera is visible or not.
|
* @property {boolean} visible - Whether this camera is visible or not.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.visible = true;
|
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 };
|
this.atLimit = { x: false, y: false };
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ Phaser.Camera.prototype = {
|
||||||
/**
|
/**
|
||||||
* Tells this camera which sprite to follow.
|
* Tells this camera which sprite to follow.
|
||||||
* @method 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 {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().
|
* @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.
|
* Move the camera focus to a location instantly.
|
||||||
* @method focusOnXY
|
* @method focusOnXY
|
||||||
|
* @memberOf Phaser.Camera
|
||||||
* @param {number} x - X position.
|
* @param {number} x - X position.
|
||||||
* @param {number} y - Y position.
|
* @param {number} y - Y position.
|
||||||
*/
|
*/
|
||||||
|
@ -146,6 +148,7 @@ Phaser.Camera.prototype = {
|
||||||
/**
|
/**
|
||||||
* Update focusing and scrolling.
|
* Update focusing and scrolling.
|
||||||
* @method update
|
* @method update
|
||||||
|
* @memberOf Phaser.Camera
|
||||||
*/
|
*/
|
||||||
update: function () {
|
update: function () {
|
||||||
|
|
||||||
|
@ -196,6 +199,7 @@ Phaser.Camera.prototype = {
|
||||||
/**
|
/**
|
||||||
* Method called to ensure the camera doesn't venture outside of the game world.
|
* Method called to ensure the camera doesn't venture outside of the game world.
|
||||||
* @method checkWorldBounds
|
* @method checkWorldBounds
|
||||||
|
* @memberOf Phaser.Camera
|
||||||
*/
|
*/
|
||||||
checkWorldBounds: function () {
|
checkWorldBounds: function () {
|
||||||
|
|
||||||
|
@ -236,6 +240,7 @@ Phaser.Camera.prototype = {
|
||||||
* without having to use game.camera.x and game.camera.y.
|
* without having to use game.camera.x and game.camera.y.
|
||||||
*
|
*
|
||||||
* @method setPosition
|
* @method setPosition
|
||||||
|
* @memberOf Phaser.Camera
|
||||||
* @param {number} x - X position.
|
* @param {number} x - X position.
|
||||||
* @param {number} y - Y 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.
|
* Sets the size of the view rectangle given the width and height in parameters.
|
||||||
*
|
*
|
||||||
* @method setSize
|
* @method setSize
|
||||||
|
* @memberOf Phaser.Camera
|
||||||
* @param {number} width - The desired width.
|
* @param {number} width - The desired width.
|
||||||
* @param {number} height - The desired height.
|
* @param {number} height - The desired height.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* @param {number} renderer -Which renderer to use (canvas or webgl)
|
* @param {number} renderer -Which renderer to use (canvas or webgl)
|
||||||
* @param {HTMLElement} parent -The Games DOM parent.
|
* @param {HTMLElement} parent -The Games DOM parent.
|
||||||
* @param {Description} state - Description.
|
* @param {Description} state - Description.
|
||||||
* @param {bool} transparent - Use a transparent canvas background or not.
|
* @param {boolean} transparent - Use a transparent canvas background or not.
|
||||||
* @param {bool} antialias - Anti-alias graphics.
|
* @param {boolean} antialias - Anti-alias graphics.
|
||||||
*/
|
*/
|
||||||
Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) {
|
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;
|
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;
|
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;
|
this.antialias = antialias;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||||
this.state = new Phaser.StateManager(this, state);
|
this.state = new Phaser.StateManager(this, state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _paused - Is game paused?
|
* @property {boolean} _paused - Is game paused?
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -89,20 +89,20 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||||
this.renderType = renderer;
|
this.renderType = renderer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _loadComplete - Whether load complete loading or not.
|
* @property {boolean} _loadComplete - Whether load complete loading or not.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this._loadComplete = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isBooted = false;
|
this.isBooted = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} id -Is game running or paused?
|
* @property {boolean} id -Is game running or paused?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
|
@ -253,6 +253,7 @@ Phaser.Game.prototype = {
|
||||||
* Initialize engine sub modules and start the game.
|
* Initialize engine sub modules and start the game.
|
||||||
*
|
*
|
||||||
* @method boot
|
* @method boot
|
||||||
|
* @memberOf Phaser.Game
|
||||||
*/
|
*/
|
||||||
boot: function () {
|
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.
|
* Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.
|
||||||
*
|
*
|
||||||
* @method setUpRenderer
|
* @method setUpRenderer
|
||||||
|
* @memberOf Phaser.Game
|
||||||
*/
|
*/
|
||||||
setUpRenderer: function () {
|
setUpRenderer: function () {
|
||||||
|
|
||||||
|
@ -369,6 +371,7 @@ Phaser.Game.prototype = {
|
||||||
* Called when the load has finished, after preload was run.
|
* Called when the load has finished, after preload was run.
|
||||||
*
|
*
|
||||||
* @method loadComplete
|
* @method loadComplete
|
||||||
|
* @memberOf Phaser.Game
|
||||||
*/
|
*/
|
||||||
loadComplete: function () {
|
loadComplete: function () {
|
||||||
|
|
||||||
|
@ -382,6 +385,7 @@ Phaser.Game.prototype = {
|
||||||
* The core game loop.
|
* The core game loop.
|
||||||
*
|
*
|
||||||
* @method update
|
* @method update
|
||||||
|
* @memberOf Phaser.Game
|
||||||
* @param {number} time - The current time as provided by RequestAnimationFrame.
|
* @param {number} time - The current time as provided by RequestAnimationFrame.
|
||||||
*/
|
*/
|
||||||
update: function (time) {
|
update: function (time) {
|
||||||
|
@ -416,6 +420,7 @@ Phaser.Game.prototype = {
|
||||||
* Nuke the entire game from orbit
|
* Nuke the entire game from orbit
|
||||||
*
|
*
|
||||||
* @method destroy
|
* @method destroy
|
||||||
|
* @memberOf Phaser.Game
|
||||||
*/
|
*/
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
/**
|
/**
|
||||||
* Phaser Group constructor.
|
* Phaser Group constructor.
|
||||||
* @class Phaser.Group
|
* @class Phaser.Group
|
||||||
* @classdesc An Animation instance contains a single animation and the controls to play it.
|
* @classdesc A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
|
||||||
* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
|
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {Phaser.Game} game - A reference to the currently running game.
|
* @param {Phaser.Game} game - A reference to the currently running game.
|
||||||
* @param {Description} parent - Description.
|
* @param {Description} parent - Description.
|
||||||
* @param {string} name - The unique name for this animation, used in playback commands.
|
* @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) {
|
Phaser.Group = function (game, parent, name, useStage) {
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ Phaser.Group = function (game, parent, name, useStage) {
|
||||||
this.type = Phaser.GROUP;
|
this.type = Phaser.GROUP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} exists - Description.
|
* @property {boolean} exists - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
this.exists = true;
|
||||||
|
@ -87,6 +86,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method add
|
* @method add
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
* @return {Description} Description.
|
* @return {Description} Description.
|
||||||
*/
|
*/
|
||||||
|
@ -112,6 +112,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method addAt
|
* @method addAt
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
* @param {Description} index - Description.
|
* @param {Description} index - Description.
|
||||||
* @return {Description} Description.
|
* @return {Description} Description.
|
||||||
|
@ -138,6 +139,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method getAt
|
* @method getAt
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} index - Description.
|
* @param {Description} index - Description.
|
||||||
* @return {Description} Description.
|
* @return {Description} Description.
|
||||||
*/
|
*/
|
||||||
|
@ -151,6 +153,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method create
|
* @method create
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {number} x - Description.
|
* @param {number} x - Description.
|
||||||
* @param {number} y - Description.
|
* @param {number} y - Description.
|
||||||
* @param {string} key - Description.
|
* @param {string} key - Description.
|
||||||
|
@ -182,9 +185,10 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method swap
|
* @method swap
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child1 - Description.
|
* @param {Description} child1 - Description.
|
||||||
* @param {Description} child2 - Description.
|
* @param {Description} child2 - Description.
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
swap: function (child1, child2) {
|
swap: function (child1, child2) {
|
||||||
|
|
||||||
|
@ -310,6 +314,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method bringToTop
|
* @method bringToTop
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
* @return {Description} Description.
|
* @return {Description} Description.
|
||||||
*/
|
*/
|
||||||
|
@ -329,6 +334,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method getIndex
|
* @method getIndex
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
* @return {Description} Description.
|
* @return {Description} Description.
|
||||||
*/
|
*/
|
||||||
|
@ -342,6 +348,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method replace
|
* @method replace
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} oldChild - Description.
|
* @param {Description} oldChild - Description.
|
||||||
* @param {Description} newChild - Description.
|
* @param {Description} newChild - Description.
|
||||||
*/
|
*/
|
||||||
|
@ -373,6 +380,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method setProperty
|
* @method setProperty
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
* @param {array} key - An array of values that will be set.
|
* @param {array} key - An array of values that will be set.
|
||||||
* @param {Description} value - Description.
|
* @param {Description} value - Description.
|
||||||
|
@ -436,6 +444,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method setAll
|
* @method setAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} key - Description.
|
* @param {Description} key - Description.
|
||||||
* @param {Description} value - Description.
|
* @param {Description} value - Description.
|
||||||
* @param {Description} checkAlive - Description.
|
* @param {Description} checkAlive - Description.
|
||||||
|
@ -474,6 +483,7 @@ Phaser.Group.prototype = {
|
||||||
* Group.addAll('x', 10) will add 10 to the child.x value.
|
* Group.addAll('x', 10) will add 10 to the child.x value.
|
||||||
*
|
*
|
||||||
* @method addAll
|
* @method addAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'.
|
* @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 {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.
|
* @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.
|
* Group.subAll('x', 10) will minus 10 from the child.x value.
|
||||||
*
|
*
|
||||||
* @method subAll
|
* @method subAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'.
|
* @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 {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.
|
* @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.
|
* Group.multiplyAll('x', 2) will x2 the child.x value.
|
||||||
*
|
*
|
||||||
* @method multiplyAll
|
* @method multiplyAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'.
|
* @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 {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.
|
* @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.
|
* Group.divideAll('x', 2) will half the child.x value.
|
||||||
*
|
*
|
||||||
* @method divideAll
|
* @method divideAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'.
|
* @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 {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.
|
* @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.
|
* After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.
|
||||||
*
|
*
|
||||||
* @method callAllExists
|
* @method callAllExists
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {function} callback - The function that exists on the children that will be called.
|
* @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 {boolean} existsValue - Only children with exists=existsValue will be called.
|
||||||
* @param {...*} parameter - Additional parameters that will be passed to the callback.
|
* @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.
|
* After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child.
|
||||||
*
|
*
|
||||||
* @method callAll
|
* @method callAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {function} callback - The function that exists on the children that will be called.
|
* @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.
|
* @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.
|
* 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
|
* @method forEach
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} callback - Description.
|
* @param {Description} callback - Description.
|
||||||
* @param {Description} callbackContext - Description.
|
* @param {Description} callbackContext - Description.
|
||||||
* @param {bool} checkExists - Description.
|
* @param {boolean} checkExists - Description.
|
||||||
*/
|
*/
|
||||||
forEach: function (callback, callbackContext, checkExists) {
|
forEach: function (callback, callbackContext, checkExists) {
|
||||||
|
|
||||||
|
@ -639,6 +655,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method forEachAlive
|
* @method forEachAlive
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} callback - Description.
|
* @param {Description} callback - Description.
|
||||||
* @param {Description} callbackContext - Description.
|
* @param {Description} callbackContext - Description.
|
||||||
*/
|
*/
|
||||||
|
@ -671,6 +688,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method forEachDead
|
* @method forEachDead
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} callback - Description.
|
* @param {Description} callback - Description.
|
||||||
* @param {Description} callbackContext - 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.
|
* Call this function to retrieve the first object with exists == (the given state) in the group.
|
||||||
*
|
*
|
||||||
* @method getFirstExists
|
* @method getFirstExists
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} state - Description.
|
* @param {Description} state - Description.
|
||||||
* @return {Any} The first child, or null if none found.
|
* @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.
|
* This is handy for checking if everything's wiped out, or choosing a squad leader, etc.
|
||||||
*
|
*
|
||||||
* @method getFirstAlive
|
* @method getFirstAlive
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @return {Any} The first alive child, or null if none found.
|
* @return {Any} The first alive child, or null if none found.
|
||||||
*/
|
*/
|
||||||
getFirstAlive: function () {
|
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.
|
* This is handy for checking if everything's wiped out, or choosing a squad leader, etc.
|
||||||
*
|
*
|
||||||
* @method getFirstDead
|
* @method getFirstDead
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @return {Any} The first dead child, or null if none found.
|
* @return {Any} The first dead child, or null if none found.
|
||||||
*/
|
*/
|
||||||
getFirstDead: function () {
|
getFirstDead: function () {
|
||||||
|
@ -794,6 +815,7 @@ Phaser.Group.prototype = {
|
||||||
* Call this function to find out how many members of the group are alive.
|
* Call this function to find out how many members of the group are alive.
|
||||||
*
|
*
|
||||||
* @method countLiving
|
* @method countLiving
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @return {number} The number of children flagged as alive. Returns -1 if Group is empty.
|
* @return {number} The number of children flagged as alive. Returns -1 if Group is empty.
|
||||||
*/
|
*/
|
||||||
countLiving: function () {
|
countLiving: function () {
|
||||||
|
@ -824,6 +846,7 @@ Phaser.Group.prototype = {
|
||||||
* Call this function to find out how many members of the group are dead.
|
* Call this function to find out how many members of the group are dead.
|
||||||
*
|
*
|
||||||
* @method countDead
|
* @method countDead
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @return {number} The number of children flagged as dead. Returns -1 if Group is empty.
|
* @return {number} The number of children flagged as dead. Returns -1 if Group is empty.
|
||||||
*/
|
*/
|
||||||
countDead: function () {
|
countDead: function () {
|
||||||
|
@ -853,6 +876,8 @@ Phaser.Group.prototype = {
|
||||||
/**
|
/**
|
||||||
* Returns a member at random from the group.
|
* 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} 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.
|
* @param {number} length - Optional restriction on the number of values you want to randomly select from.
|
||||||
* @return {Any} A random child of this Group.
|
* @return {Any} A random child of this Group.
|
||||||
|
@ -875,6 +900,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method remove
|
* @method remove
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} child - Description.
|
* @param {Description} child - Description.
|
||||||
*/
|
*/
|
||||||
remove: function (child) {
|
remove: function (child) {
|
||||||
|
@ -889,6 +915,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method removeAll
|
* @method removeAll
|
||||||
|
* @memberOf Phaser.Group
|
||||||
*/
|
*/
|
||||||
removeAll: function () {
|
removeAll: function () {
|
||||||
|
|
||||||
|
@ -913,6 +940,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method removeBetween
|
* @method removeBetween
|
||||||
|
* @memberOf Phaser.Group
|
||||||
* @param {Description} startIndex - Description.
|
* @param {Description} startIndex - Description.
|
||||||
* @param {Description} endIndex - Description.
|
* @param {Description} endIndex - Description.
|
||||||
*/
|
*/
|
||||||
|
@ -941,6 +969,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method destroy
|
* @method destroy
|
||||||
|
* @memberOf Phaser.Group
|
||||||
*/
|
*/
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
|
|
||||||
|
@ -960,6 +989,7 @@ Phaser.Group.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
*
|
*
|
||||||
* @method dump
|
* @method dump
|
||||||
|
* @memberOf Phaser.Group
|
||||||
*/
|
*/
|
||||||
dump: function (full) {
|
dump: function (full) {
|
||||||
|
|
||||||
|
|
|
@ -29,37 +29,37 @@ Phaser.Plugin = function (game, parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} active - Description.
|
* @property {boolean} active - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.active = false;
|
this.active = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} visible - Description.
|
* @property {boolean} visible - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} hasPreUpdate - Description.
|
* @property {boolean} hasPreUpdate - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.hasPreUpdate = false;
|
this.hasPreUpdate = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} hasUpdate - Description.
|
* @property {boolean} hasUpdate - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.hasUpdate = false;
|
this.hasUpdate = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} hasRender - Description.
|
* @property {boolean} hasRender - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.hasRender = false;
|
this.hasRender = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} hasPostRender - Description.
|
* @property {boolean} hasPostRender - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.hasPostRender = false;
|
this.hasPostRender = false;
|
||||||
|
|
|
@ -47,13 +47,13 @@ Phaser.Signal.prototype = {
|
||||||
* If Signal should keep record of previously dispatched parameters and
|
* If Signal should keep record of previously dispatched parameters and
|
||||||
* automatically execute listener during `add()`/`addOnce()` if Signal was
|
* automatically execute listener during `add()`/`addOnce()` if Signal was
|
||||||
* already dispatched before.
|
* already dispatched before.
|
||||||
* @property {bool} memorize
|
* @property {boolean} memorize
|
||||||
*/
|
*/
|
||||||
memorize: false,
|
memorize: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} _shouldPropagate
|
* @property {boolean} _shouldPropagate
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_shouldPropagate: true,
|
_shouldPropagate: true,
|
||||||
|
@ -61,7 +61,7 @@ Phaser.Signal.prototype = {
|
||||||
/**
|
/**
|
||||||
* If Signal is active and should broadcast events.
|
* 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>
|
* <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
|
* @default
|
||||||
*/
|
*/
|
||||||
active: true,
|
active: true,
|
||||||
|
@ -84,7 +84,7 @@ Phaser.Signal.prototype = {
|
||||||
*
|
*
|
||||||
* @method _registerListener
|
* @method _registerListener
|
||||||
* @param {function} listener - Signal handler function.
|
* @param {function} listener - Signal handler function.
|
||||||
* @param {bool} isOnce - Description.
|
* @param {boolean} isOnce - Description.
|
||||||
* @param {object} [listenerContext] - 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).
|
* @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.
|
* @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener.
|
||||||
|
@ -152,7 +152,7 @@ Phaser.Signal.prototype = {
|
||||||
* @method has
|
* @method has
|
||||||
* @param {Function} listener - Signal handler function.
|
* @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).
|
* @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) {
|
has: function (listener, context) {
|
||||||
return this._indexOfListener(listener, context) !== -1;
|
return this._indexOfListener(listener, context) !== -1;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* @inner
|
* @inner
|
||||||
* @param {Signal} signal - Reference to Signal object that listener is currently bound to.
|
* @param {Signal} signal - Reference to Signal object that listener is currently bound to.
|
||||||
* @param {function} listener - Handler function bound to the signal.
|
* @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 {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).
|
* @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;
|
this._listener = listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _isOnce - If binding should be executed just once.
|
* @property {boolean} _isOnce - If binding should be executed just once.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._isOnce = isOnce;
|
this._isOnce = isOnce;
|
||||||
|
@ -62,7 +62,7 @@ Phaser.SignalBinding.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If binding is active and should be executed.
|
* If binding is active and should be executed.
|
||||||
* @property {bool} active
|
* @property {boolean} active
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
active: true,
|
active: true,
|
||||||
|
@ -112,7 +112,7 @@ Phaser.SignalBinding.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method isBound
|
* @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 () {
|
isBound: function () {
|
||||||
return (!!this._signal && !!this._listener);
|
return (!!this._signal && !!this._listener);
|
||||||
|
@ -120,7 +120,7 @@ Phaser.SignalBinding.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method isOnce
|
* @method isOnce
|
||||||
* @return {bool} If SignalBinding will only be executed once.
|
* @return {boolean} If SignalBinding will only be executed once.
|
||||||
*/
|
*/
|
||||||
isOnce: function () {
|
isOnce: function () {
|
||||||
return this._isOnce;
|
return this._isOnce;
|
||||||
|
|
|
@ -51,7 +51,7 @@ Phaser.StateManager.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag that sets if the State has been created or not.
|
* Flag that sets if the State has been created or not.
|
||||||
* @property {bool}_created
|
* @property {boolean}_created
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_created: false,
|
_created: false,
|
||||||
|
@ -160,7 +160,7 @@ Phaser.StateManager.prototype = {
|
||||||
* @method add
|
* @method add
|
||||||
* @param key {string} - A unique key you use to reference this state, i.e. "MainMenu", "Level1".
|
* @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 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) {
|
add: function (key, state, autoStart) {
|
||||||
|
|
||||||
|
@ -241,8 +241,8 @@ Phaser.StateManager.prototype = {
|
||||||
* Start the given state
|
* Start the given state
|
||||||
* @method start
|
* @method start
|
||||||
* @param {string} key - The key of the state you want to 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 {boolean} [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} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true)
|
||||||
*/
|
*/
|
||||||
start: function (key, clearWorld, clearCache) {
|
start: function (key, clearWorld, clearCache) {
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ Phaser.StateManager.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
* @method checkState
|
* @method checkState
|
||||||
* @param {string} key - The key of the state you want to check.
|
* @param {string} key - The key of the state you want to check.
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
checkState: function (key) {
|
checkState: function (key) {
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ Object.defineProperty(Phaser.World.prototype, "width", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method width
|
* @method width
|
||||||
* @return {Number} The current width of the game world
|
* @return {number} The current width of the game world
|
||||||
*/
|
*/
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.bounds.width;
|
return this.bounds.width;
|
||||||
|
@ -178,7 +178,7 @@ Object.defineProperty(Phaser.World.prototype, "width", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method width
|
* @method width
|
||||||
* @return {Number} Sets the width of the game world
|
* @return {number} Sets the width of the game world
|
||||||
*/
|
*/
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
this.bounds.width = value;
|
this.bounds.width = value;
|
||||||
|
|
|
@ -26,13 +26,13 @@ Phaser.BitmapText = function (game, x, y, text, style) {
|
||||||
style = 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.alive = true;
|
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);
|
this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} renderable - Description.
|
* @property {boolean} renderable - Description.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.renderable = true;
|
this.renderable = true;
|
||||||
|
|
|
@ -44,7 +44,7 @@ Phaser.GameObjectFactory.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
* @method existing.
|
* @method existing.
|
||||||
* @param {object} - Description.
|
* @param {object} - Description.
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
existing: function (object) {
|
existing: function (object) {
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,13 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
||||||
this.game = game;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.alive = true;
|
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.
|
* 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.
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.autoCull = false;
|
this.autoCull = false;
|
||||||
|
@ -290,7 +290,7 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
||||||
this.inWorldThreshold = 0;
|
this.inWorldThreshold = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _outOfBoundsFired - Description.
|
* @property {boolean} _outOfBoundsFired - Description.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -649,7 +649,7 @@ Phaser.Sprite.prototype.getBounds = function(rect) {
|
||||||
*
|
*
|
||||||
* @method play
|
* @method play
|
||||||
* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump".
|
* @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.
|
* @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.
|
* @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?
|
* Is this sprite visible to the camera or not?
|
||||||
* @returns {bool}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Sprite.prototype, "inCamera", {
|
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
|
// 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
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
|
// 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.alive = true;
|
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);
|
this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} renderable - Description.
|
* @property {boolean} renderable - Description.
|
||||||
*/
|
*/
|
||||||
this.renderable = true;
|
this.renderable = true;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ Phaser.Circle.prototype = {
|
||||||
* (can be Circle, Point or anything with x/y properties)
|
* (can be Circle, Point or anything with x/y properties)
|
||||||
* @method distance
|
* @method distance
|
||||||
* @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object.
|
* @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.
|
* @return {number} The distance between this Point object and the destination Point object.
|
||||||
*/
|
*/
|
||||||
distance: function (dest, round) {
|
distance: function (dest, round) {
|
||||||
|
@ -144,7 +144,7 @@ Phaser.Circle.prototype = {
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param {number} x - The X value of the coordinate to test.
|
* @param {number} x - The X value of the coordinate to test.
|
||||||
* @param {number} y - The Y 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) {
|
contains: function (x, y) {
|
||||||
return Phaser.Circle.contains(this, 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.
|
* Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.
|
||||||
* @method circumferencePoint
|
* @method circumferencePoint
|
||||||
* @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from.
|
* @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.
|
* @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.
|
* @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.
|
* The diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2.
|
||||||
* @method diameter
|
* @method diameter
|
||||||
* @param {Number} The diameter of the circle.
|
* @param {number} The diameter of the circle.
|
||||||
**/
|
**/
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
|
@ -362,7 +362,7 @@ Object.defineProperty(Phaser.Circle.prototype, "area", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether or not this Circle object is empty.
|
* 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.
|
* 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.
|
* @param {Description} value - Description.
|
||||||
|
@ -392,7 +392,7 @@ Object.defineProperty(Phaser.Circle.prototype, "empty", {
|
||||||
* @param {Phaser.Circle} a - The Circle to be checked.
|
* @param {Phaser.Circle} a - The Circle to be checked.
|
||||||
* @param {number} x - The X value of the coordinate to test.
|
* @param {number} x - The X value of the coordinate to test.
|
||||||
* @param {number} y - The Y 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) {
|
Phaser.Circle.contains = function (a, x, y) {
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ Phaser.Circle.contains = function (a, x, y) {
|
||||||
* @method equals
|
* @method equals
|
||||||
* @param {Phaser.Circle} a - The first Circle object.
|
* @param {Phaser.Circle} a - The first Circle object.
|
||||||
* @param {Phaser.Circle} b - The second 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) {
|
Phaser.Circle.equals = function (a, b) {
|
||||||
return (a.x == b.x && a.y == b.y && a.diameter == b.diameter);
|
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
|
* @method intersects
|
||||||
* @param {Phaser.Circle} a - The first Circle object.
|
* @param {Phaser.Circle} a - The first Circle object.
|
||||||
* @param {Phaser.Circle} b - The second 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) {
|
Phaser.Circle.intersects = function (a, b) {
|
||||||
return (Phaser.Math.distance(a.x, a.y, b.x, b.y) <= (a.radius + b.radius));
|
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
|
* @method circumferencePoint
|
||||||
* @param {Phaser.Circle} a - The first Circle object.
|
* @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 {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.
|
* @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.
|
* @return {Phaser.Point} The Point object holding the result.
|
||||||
*/
|
*/
|
||||||
|
@ -463,7 +463,7 @@ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) {
|
||||||
* @method intersectsRectangle
|
* @method intersectsRectangle
|
||||||
* @param {Phaser.Circle} c - The Circle object to test.
|
* @param {Phaser.Circle} c - The Circle object to test.
|
||||||
* @param {Phaser.Rectangle} r - The Rectangle 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) {
|
Phaser.Circle.intersectsRectangle = function (c, r) {
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
* @class Point
|
* @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.
|
* @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
|
* @constructor
|
||||||
* @param {Number} x The horizontal 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)
|
* @param {number} y The vertical position of this Point (default 0)
|
||||||
**/
|
**/
|
||||||
Phaser.Point = function (x, y) {
|
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)
|
* Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)
|
||||||
* @method distance
|
* @method distance
|
||||||
* @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object.
|
* @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.
|
* @return {number} The distance between this Point object and the destination Point object.
|
||||||
*/
|
*/
|
||||||
distance: function (dest, round) {
|
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.
|
* Determines whether the given objects x/y values are equal to this Point object.
|
||||||
* @method equals
|
* @method equals
|
||||||
* @param {Phaser.Point} a - The first object to compare.
|
* @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) {
|
equals: function (a) {
|
||||||
return (a.x == this.x && a.y == this.y);
|
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} x - The x coordinate of the anchor point
|
||||||
* @param {number} y - The y 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 {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.
|
* @param {number} [distance] - An optional distance constraint between the Point and the anchor.
|
||||||
* @return {Phaser.Point} The modified point object.
|
* @return {Phaser.Point} The modified point object.
|
||||||
*/
|
*/
|
||||||
|
@ -309,7 +309,7 @@ Phaser.Point.divide = function (a, b, out) {
|
||||||
* @method equals
|
* @method equals
|
||||||
* @param {Phaser.Point} a - The first Point object.
|
* @param {Phaser.Point} a - The first Point object.
|
||||||
* @param {Phaser.Point} b - The second 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) {
|
Phaser.Point.equals = function (a, b) {
|
||||||
return (a.x == b.x && a.y == b.y);
|
return (a.x == b.x && a.y == b.y);
|
||||||
|
@ -320,8 +320,8 @@ Phaser.Point.equals = function (a, b) {
|
||||||
* @method distance
|
* @method distance
|
||||||
* @param {object} a - The target object. Must have visible x and y properties that represent the center of the object.
|
* @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 {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).
|
* @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.
|
* @return {number} The distance between this Point object and the destination Point object.
|
||||||
*/
|
*/
|
||||||
Phaser.Point.distance = function (a, b, round) {
|
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} x - The x coordinate of the anchor point
|
||||||
* @param {number} y - The y 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 {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.
|
* @param {number} distance - An optional distance constraint between the Point and the anchor.
|
||||||
* @return {Phaser.Point} The modified point object.
|
* @return {Phaser.Point} The modified point object.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -168,7 +168,7 @@ Phaser.Rectangle.prototype = {
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param {number} x - The x coordinate of the point to test.
|
* @param {number} x - The x coordinate of the point to test.
|
||||||
* @param {number} y - The y 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) {
|
contains: function (x, y) {
|
||||||
return Phaser.Rectangle.contains(this, 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.
|
* A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.
|
||||||
* @method containsRect
|
* @method containsRect
|
||||||
* @param {Phaser.Rectangle} b - The second 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.
|
||||||
*/
|
*/
|
||||||
containsRect: function (b) {
|
containsRect: function (b) {
|
||||||
return Phaser.Rectangle.containsRect(this, 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.
|
* This method compares the x, y, width and height properties of each Rectangle.
|
||||||
* @method equals
|
* @method equals
|
||||||
* @param {Phaser.Rectangle} b - The second 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.
|
||||||
*/
|
*/
|
||||||
equals: function (b) {
|
equals: function (b) {
|
||||||
return Phaser.Rectangle.equals(this, b);
|
return Phaser.Rectangle.equals(this, b);
|
||||||
|
@ -213,7 +213,7 @@ Phaser.Rectangle.prototype = {
|
||||||
* @method intersects
|
* @method intersects
|
||||||
* @param {Phaser.Rectangle} b - The second 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.
|
* @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) {
|
intersects: function (b, tolerance) {
|
||||||
return Phaser.Rectangle.intersects(this, b, tolerance);
|
return Phaser.Rectangle.intersects(this, b, tolerance);
|
||||||
|
@ -227,7 +227,7 @@ Phaser.Rectangle.prototype = {
|
||||||
* @param {number} top - Description.
|
* @param {number} top - Description.
|
||||||
* @param {number} bottomt - Description.
|
* @param {number} bottomt - Description.
|
||||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0
|
* @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) {
|
intersectsRaw: function (left, right, top, bottom, tolerance) {
|
||||||
return Phaser.Rectangle.intersectsRaw(this, 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.
|
* 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.
|
* 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
|
* @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.
|
* 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
|
* @method inflate
|
||||||
* @param {Phaser.Rectangle} a - The Rectangle object.
|
* @param {Phaser.Rectangle} a - The Rectangle object.
|
||||||
* @param {Number} dx - The amount to be added to the left 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.
|
* @param {number} dy - The amount to be added to the bottom side of the Rectangle.
|
||||||
* @return {Phaser.Rectangle} This Rectangle object.
|
* @return {Phaser.Rectangle} This Rectangle object.
|
||||||
*/
|
*/
|
||||||
Phaser.Rectangle.inflate = function (a, dx, dy) {
|
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 {Phaser.Rectangle} a - The Rectangle object.
|
||||||
* @param {number} x - The x coordinate of the point to test.
|
* @param {number} x - The x coordinate of the point to test.
|
||||||
* @param {number} y - The y 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) {
|
Phaser.Rectangle.contains = function (a, x, y) {
|
||||||
return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom);
|
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
|
* @method containsPoint
|
||||||
* @param {Phaser.Rectangle} a - The Rectangle object.
|
* @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.
|
* @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) {
|
Phaser.Rectangle.containsPoint = function (a, point) {
|
||||||
return Phaser.Phaser.Rectangle.contains(a, point.x, point.y);
|
return Phaser.Phaser.Rectangle.contains(a, point.x, point.y);
|
||||||
|
@ -582,7 +582,7 @@ Phaser.Rectangle.containsPoint = function (a, point) {
|
||||||
* @method containsRect
|
* @method containsRect
|
||||||
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
||||||
* @param {Phaser.Rectangle} b - The second 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) {
|
Phaser.Rectangle.containsRect = function (a, b) {
|
||||||
|
|
||||||
|
@ -602,7 +602,7 @@ Phaser.Rectangle.containsRect = function (a, b) {
|
||||||
* @method equals
|
* @method equals
|
||||||
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
* @param {Phaser.Rectangle} a - The first Rectangle object.
|
||||||
* @param {Phaser.Rectangle} b - The second 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) {
|
Phaser.Rectangle.equals = function (a, b) {
|
||||||
return (a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height);
|
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} a - The first Rectangle object.
|
||||||
* @param {Phaser.Rectangle} b - The second 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
|
* @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) {
|
Phaser.Rectangle.intersects = function (a, b, tolerance) {
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ Phaser.Rectangle.intersects = function (a, b, tolerance) {
|
||||||
* @param {number} top - Description.
|
* @param {number} top - Description.
|
||||||
* @param {number} bottom - Description.
|
* @param {number} bottom - Description.
|
||||||
* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0
|
* @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) {
|
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.
|
* 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
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
disabled: false,
|
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.
|
* 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 cleared each time the Pointer is pressed down.
|
||||||
* The history is updated at the rate specified in Input.pollRate
|
* The history is updated at the rate specified in Input.pollRate
|
||||||
* @property {bool} recordPointerHistory
|
* @property {boolean} recordPointerHistory
|
||||||
* @default
|
* @default
|
||||||
**/
|
**/
|
||||||
recordPointerHistory: false,
|
recordPointerHistory: false,
|
||||||
|
@ -446,7 +446,7 @@ Phaser.Input.prototype = {
|
||||||
/**
|
/**
|
||||||
* Reset all of the Pointers and Input states
|
* Reset all of the Pointers and Input states
|
||||||
* @method reset
|
* @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) {
|
reset: function (hard) {
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ Phaser.Input.prototype = {
|
||||||
/**
|
/**
|
||||||
* Get the next Pointer object whos active property matches the given state
|
* Get the next Pointer object whos active property matches the given state
|
||||||
* @method getPointer
|
* @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.
|
* @return {Pointer} A Pointer object or null if no Pointer object matches the requested state.
|
||||||
**/
|
**/
|
||||||
getPointer: function (state) {
|
getPointer: function (state) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ Phaser.InputHandler = function (sprite) {
|
||||||
this.sprite = sprite;
|
this.sprite = sprite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} enabled - Description.
|
* @property {boolean} enabled - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
@ -68,31 +68,31 @@ Phaser.InputHandler = function (sprite) {
|
||||||
this.priorityID = 0;
|
this.priorityID = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} useHandCursor - Description.
|
* @property {boolean} useHandCursor - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.useHandCursor = false;
|
this.useHandCursor = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} isDragged - Description.
|
* @property {boolean} isDragged - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isDragged = false;
|
this.isDragged = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} allowHorizontalDrag - Description.
|
* @property {boolean} allowHorizontalDrag - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.allowHorizontalDrag = true;
|
this.allowHorizontalDrag = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} allowVerticalDrag - Description.
|
* @property {boolean} allowVerticalDrag - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.allowVerticalDrag = true;
|
this.allowVerticalDrag = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} bringToTop - Description.
|
* @property {boolean} bringToTop - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.bringToTop = false;
|
this.bringToTop = false;
|
||||||
|
@ -104,13 +104,13 @@ Phaser.InputHandler = function (sprite) {
|
||||||
this.snapOffset = null;
|
this.snapOffset = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} snapOnDrag - Description.
|
* @property {boolean} snapOnDrag - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.snapOnDrag = false;
|
this.snapOnDrag = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} snapOnRelease - Description.
|
* @property {boolean} snapOnRelease - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.snapOnRelease = false;
|
this.snapOnRelease = false;
|
||||||
|
@ -140,7 +140,7 @@ Phaser.InputHandler = function (sprite) {
|
||||||
this.pixelPerfectAlpha = 255;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.draggable = false;
|
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.
|
* 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.
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.consumePointerEvent = false;
|
this.consumePointerEvent = false;
|
||||||
|
@ -197,7 +197,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
* @method start
|
* @method start
|
||||||
* @param {number} priority - Description.
|
* @param {number} priority - Description.
|
||||||
* @param {bool} useHandCursor - Description.
|
* @param {boolean} useHandCursor - Description.
|
||||||
* @return {Phaser.Sprite} Description.
|
* @return {Phaser.Sprite} Description.
|
||||||
*/
|
*/
|
||||||
start: function (priority, useHandCursor) {
|
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.
|
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
|
||||||
* @method pointerDown
|
* @method pointerDown
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
pointerDown: function (pointer) {
|
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
|
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true
|
||||||
* @method pointerUp
|
* @method pointerUp
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
pointerUp: function (pointer) {
|
pointerUp: function (pointer) {
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* Is the Pointer outside of this Sprite?
|
* Is the Pointer outside of this Sprite?
|
||||||
* @method pointerOut
|
* @method pointerOut
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
pointerOut: function (pointer) {
|
pointerOut: function (pointer) {
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* Checks if the given pointer is over this Sprite.
|
* Checks if the given pointer is over this Sprite.
|
||||||
* @method checkPointerOver
|
* @method checkPointerOver
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
checkPointerOver: function (pointer) {
|
checkPointerOver: function (pointer) {
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* @method checkPixel
|
* @method checkPixel
|
||||||
* @param {Description} x - Description.
|
* @param {Description} x - Description.
|
||||||
* @param {Description} y - Description.
|
* @param {Description} y - Description.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
checkPixel: function (x, y) {
|
checkPixel: function (x, y) {
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* Updates the Pointer drag on this Sprite.
|
* Updates the Pointer drag on this Sprite.
|
||||||
* @method updateDrag
|
* @method updateDrag
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
updateDrag: function (pointer) {
|
updateDrag: function (pointer) {
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* @method justOver
|
* @method justOver
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @param {number} delay - The time below which the pointer is considered as just over.
|
* @param {number} delay - The time below which the pointer is considered as just over.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justOver: function (pointer, delay) {
|
justOver: function (pointer, delay) {
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* @method justOut
|
* @method justOut
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @param {number} delay - The time below which the pointer is considered as just out.
|
* @param {number} delay - The time below which the pointer is considered as just out.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justOut: function (pointer, delay) {
|
justOut: function (pointer, delay) {
|
||||||
|
|
||||||
|
@ -773,7 +773,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* @method justPressed
|
* @method justPressed
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @param {number} delay - The time below which the pointer is considered as just over.
|
* @param {number} delay - The time below which the pointer is considered as just over.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justPressed: function (pointer, delay) {
|
justPressed: function (pointer, delay) {
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ Phaser.InputHandler.prototype = {
|
||||||
* @method justReleased
|
* @method justReleased
|
||||||
* @param {Pointer} pointer
|
* @param {Pointer} pointer
|
||||||
* @param {number} delay - The time below which the pointer is considered as just out.
|
* @param {number} delay - The time below which the pointer is considered as just out.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justReleased: function (pointer, delay) {
|
justReleased: function (pointer, delay) {
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,8 @@ Phaser.Key.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justPressed: function (duration) {
|
justPressed: function (duration) {
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ Phaser.Key.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justReleased: function (duration) {
|
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.
|
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||||
* @default
|
* @default
|
||||||
* @property {bool} disabled
|
* @property {boolean} disabled
|
||||||
*/
|
*/
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ Phaser.Keyboard.prototype = {
|
||||||
* @method justPressed
|
* @method justPressed
|
||||||
* @param {number} keycode
|
* @param {number} keycode
|
||||||
* @param {number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justPressed: function (keycode, duration) {
|
justPressed: function (keycode, duration) {
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ Phaser.Keyboard.prototype = {
|
||||||
* @method justReleased
|
* @method justReleased
|
||||||
* @param {number} keycode
|
* @param {number} keycode
|
||||||
* @param {number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justReleased: function (keycode, duration) {
|
justReleased: function (keycode, duration) {
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ Phaser.Keyboard.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
* @method isDown
|
* @method isDown
|
||||||
* @param {number} keycode
|
* @param {number} keycode
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
isDown: function (keycode) {
|
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.
|
* 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,
|
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.
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the mouse has been Pointer Locked successfully this will be set to true.
|
* If the mouse has been Pointer Locked successfully this will be set to true.
|
||||||
* @property {bool} locked
|
* @property {boolean} locked
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
locked: false,
|
locked: false,
|
||||||
|
|
|
@ -18,7 +18,7 @@ Phaser.Pointer = function (game, id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local private variable to store the status of dispatching a hold event.
|
* Local private variable to store the status of dispatching a hold event.
|
||||||
* @property {bool} _holdSent
|
* @property {boolean} _holdSent
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ Phaser.Pointer = function (game, id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitor events outside of a state reset loop.
|
* Monitor events outside of a state reset loop.
|
||||||
* @property {bool} _stateReset
|
* @property {boolean} _stateReset
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -71,7 +71,7 @@ Phaser.Pointer = function (game, id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} withinGame
|
* @property {boolean} withinGame
|
||||||
*/
|
*/
|
||||||
this.withinGame = false;
|
this.withinGame = false;
|
||||||
|
|
||||||
|
@ -133,21 +133,21 @@ Phaser.Pointer = function (game, id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the Pointer is a mouse this is true, otherwise false.
|
* If the Pointer is a mouse this is true, otherwise false.
|
||||||
* @property {bool} isMouse
|
* @property {boolean} isMouse
|
||||||
* @type {bool}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
this.isMouse = false;
|
this.isMouse = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isDown = false;
|
this.isDown = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true.
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isUp = true;
|
this.isUp = true;
|
||||||
|
@ -206,7 +206,7 @@ Phaser.Pointer = function (game, id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} isDown - Description.
|
* @property {boolean} isDown - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.active = false;
|
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.
|
* The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.
|
||||||
* @method justPressed
|
* @method justPressed
|
||||||
* @param {number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justPressed: function (duration) {
|
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.
|
* The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.
|
||||||
* @method justReleased
|
* @method justReleased
|
||||||
* @param {number} [duration]
|
* @param {number} [duration]
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
justReleased: function (duration) {
|
justReleased: function (duration) {
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ Phaser.Touch = function (game) {
|
||||||
this.touchCancelCallback = null;
|
this.touchCancelCallback = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} preventDefault - Description.
|
* @property {boolean} preventDefault - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.preventDefault = true;
|
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.
|
* You can disable all Input by setting disabled = true. While set all new input related events will be ignored.
|
||||||
* @method disabled
|
* @method disabled
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ Phaser.Cache.prototype = {
|
||||||
/**
|
/**
|
||||||
* Checks if an image key exists.
|
* Checks if an image key exists.
|
||||||
* @param {string} key - Asset key of the image you want.
|
* @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) {
|
checkImageKey: function (key) {
|
||||||
|
|
||||||
|
|
|
@ -54,13 +54,13 @@ Phaser.Loader = function (game) {
|
||||||
this.queueSize = 0;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isLoading = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.hasLoaded = false;
|
this.hasLoaded = false;
|
||||||
|
@ -155,7 +155,7 @@ Phaser.Loader.prototype = {
|
||||||
* Check whether asset exists with a specific key.
|
* Check whether asset exists with a specific key.
|
||||||
* @method checkKeyExists
|
* @method checkKeyExists
|
||||||
* @param {string} key - Key of the asset you want to check.
|
* @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) {
|
checkKeyExists: function (key) {
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ Phaser.Loader.prototype = {
|
||||||
* @method text
|
* @method text
|
||||||
* @param {string} key - Unique asset key of the text file.
|
* @param {string} key - Unique asset key of the text file.
|
||||||
* @param {string} url - URL 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) {
|
text: function (key, url, overwrite) {
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ Phaser.Loader.prototype = {
|
||||||
* @method audio
|
* @method audio
|
||||||
* @param {string} key - Unique asset key of the audio file.
|
* @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 {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) {
|
audio: function (key, urls, autoDecode) {
|
||||||
|
|
||||||
|
@ -978,7 +978,7 @@ Phaser.Loader.prototype = {
|
||||||
/**
|
/**
|
||||||
* Handle loading next file.
|
* Handle loading next file.
|
||||||
* @param previousKey {string} Key of previous loaded asset.
|
* @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) {
|
nextFile: function (previousKey, success) {
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Phaser.Math = {
|
||||||
* @param {number} a
|
* @param {number} a
|
||||||
* @param {number} b
|
* @param {number} b
|
||||||
* @param {number} epsilon
|
* @param {number} epsilon
|
||||||
* @return {bool} True if |a-b|<ε
|
* @return {boolean} True if |a-b|<ε
|
||||||
*/
|
*/
|
||||||
fuzzyEqual: function (a, b, epsilon) {
|
fuzzyEqual: function (a, b, epsilon) {
|
||||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||||
|
@ -38,7 +38,7 @@ Phaser.Math = {
|
||||||
* @param {number} a
|
* @param {number} a
|
||||||
* @param {number} b
|
* @param {number} b
|
||||||
* @param {number} epsilon
|
* @param {number} epsilon
|
||||||
* @return {bool} True if a<b+ε
|
* @return {boolean} True if a<b+ε
|
||||||
*/
|
*/
|
||||||
fuzzyLessThan: function (a, b, epsilon) {
|
fuzzyLessThan: function (a, b, epsilon) {
|
||||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||||
|
@ -51,7 +51,7 @@ Phaser.Math = {
|
||||||
* @param {number} a
|
* @param {number} a
|
||||||
* @param {number} b
|
* @param {number} b
|
||||||
* @param {number} epsilon
|
* @param {number} epsilon
|
||||||
* @return {bool} True if a>b+ε
|
* @return {boolean} True if a>b+ε
|
||||||
*/
|
*/
|
||||||
fuzzyGreaterThan: function (a, b, epsilon) {
|
fuzzyGreaterThan: function (a, b, epsilon) {
|
||||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||||
|
@ -62,7 +62,7 @@ Phaser.Math = {
|
||||||
* @method fuzzyCeil
|
* @method fuzzyCeil
|
||||||
* @param {number} val
|
* @param {number} val
|
||||||
* @param {number} epsilon
|
* @param {number} epsilon
|
||||||
* @return {bool} ceiling(val-ε)
|
* @return {boolean} ceiling(val-ε)
|
||||||
*/
|
*/
|
||||||
fuzzyCeil: function (val, epsilon) {
|
fuzzyCeil: function (val, epsilon) {
|
||||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||||
|
@ -73,7 +73,7 @@ Phaser.Math = {
|
||||||
* @method fuzzyFloor
|
* @method fuzzyFloor
|
||||||
* @param {number} val
|
* @param {number} val
|
||||||
* @param {number} epsilon
|
* @param {number} epsilon
|
||||||
* @return {bool} floor(val-ε)
|
* @return {boolean} floor(val-ε)
|
||||||
*/
|
*/
|
||||||
fuzzyFloor: function (val, epsilon) {
|
fuzzyFloor: function (val, epsilon) {
|
||||||
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
if (typeof epsilon === "undefined") { epsilon = 0.0001; }
|
||||||
|
@ -198,7 +198,7 @@ Phaser.Math = {
|
||||||
* @method
|
* @method
|
||||||
* @param {number} input
|
* @param {number} input
|
||||||
* @param {array} arr
|
* @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) {
|
snapToInArray: function (input, arr, sort) {
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ Phaser.Math = {
|
||||||
* Set an angle within the bounds of -π toπ.
|
* Set an angle within the bounds of -π toπ.
|
||||||
* @method normalizeAngle
|
* @method normalizeAngle
|
||||||
* @param {number} angle
|
* @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) {
|
normalizeAngle: function (angle, radians) {
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ Phaser.Math = {
|
||||||
* @method nearestAngleBetween
|
* @method nearestAngleBetween
|
||||||
* @param {number} a1
|
* @param {number} a1
|
||||||
* @param {number} a2
|
* @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) {
|
nearestAngleBetween: function (a1, a2, radians) {
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ Phaser.Math = {
|
||||||
* @param {number} a1 - Description.
|
* @param {number} a1 - Description.
|
||||||
* @param {number} a2 - Description.
|
* @param {number} a2 - Description.
|
||||||
* @param {number} weight - 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.
|
* @param {Description} ease - Description.
|
||||||
*/
|
*/
|
||||||
interpolateAngles: function (a1, a2, weight, radians, ease) {
|
interpolateAngles: function (a1, a2, weight, radians, ease) {
|
||||||
|
@ -402,7 +402,7 @@ Phaser.Math = {
|
||||||
* </p>
|
* </p>
|
||||||
* @method chanceRoll
|
* @method chanceRoll
|
||||||
* @param {number} chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).
|
* @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) {
|
chanceRoll: function (chance) {
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ Phaser.Math = {
|
||||||
*
|
*
|
||||||
* @method isOdd
|
* @method isOdd
|
||||||
* @param {number} n - The number to check.
|
* @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) {
|
isOdd: function (n) {
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ Phaser.Math = {
|
||||||
*
|
*
|
||||||
* @method isEven
|
* @method isEven
|
||||||
* @param {number} n - The number to check.
|
* @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) {
|
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).
|
* How often a particle is emitted in ms (if emitter is started with Explode == false).
|
||||||
* @property {bool} frequency
|
* @property {boolean} frequency
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.frequency = 100;
|
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).
|
* Internal helper for the style of particle emission (all at once, or one at a time).
|
||||||
* @property {bool} _explode
|
* @property {boolean} _explode
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -196,14 +196,14 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
||||||
/**
|
/**
|
||||||
* Determines whether the emitter is currently emitting particles.
|
* Determines whether the emitter is currently emitting particles.
|
||||||
* It is totally safe to directly toggle this.
|
* It is totally safe to directly toggle this.
|
||||||
* @property {bool} on
|
* @property {boolean} on
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.on = false;
|
this.on = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the emitter is being updated by the core game loop.
|
* Determines whether the emitter is being updated by the core game loop.
|
||||||
* @property {bool} exists
|
* @property {boolean} exists
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
this.exists = true;
|
||||||
|
@ -212,7 +212,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
||||||
* The point the particles are emitted from.
|
* The point the particles are emitted from.
|
||||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
* 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.
|
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||||
* @property {bool} emitX
|
* @property {boolean} emitX
|
||||||
*/
|
*/
|
||||||
this.emitX = x;
|
this.emitX = x;
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
|
||||||
* The point the particles are emitted from.
|
* The point the particles are emitted from.
|
||||||
* Emitter.x and Emitter.y control the containers location, which updates all current particles
|
* 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.
|
* Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.
|
||||||
* @property {bool} emitY
|
* @property {boolean} emitY
|
||||||
*/
|
*/
|
||||||
this.emitY = y;
|
this.emitY = y;
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () {
|
||||||
* @param {number} frames - Description.
|
* @param {number} frames - Description.
|
||||||
* @param {number} quantity - The number of particles to generate when using the "create from image" option.
|
* @param {number} quantity - The number of particles to generate when using the "create from image" option.
|
||||||
* @param {number} collide - Description.
|
* @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).
|
* @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) {
|
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.
|
* Get the emitter visible state.
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*//**
|
*//**
|
||||||
* Set the emitter visible state.
|
* Set the emitter visible state.
|
||||||
* @param {bool} value - Description
|
* @param {boolean} value - Description
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", {
|
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", {
|
||||||
|
|
||||||
|
@ -601,10 +601,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*//**
|
*//**
|
||||||
* Set
|
* Set
|
||||||
* @param {bool} value - Description
|
* @param {boolean} value - Description
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", {
|
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", {
|
||||||
|
|
||||||
|
@ -620,10 +620,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*//**
|
*//**
|
||||||
* Set
|
* Set
|
||||||
* @param {bool} value - Description
|
* @param {boolean} value - Description
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", {
|
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.
|
* 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
|
* @method bottom
|
||||||
* @return {Number}
|
* @return {number}
|
||||||
**/
|
**/
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.y + this.height;
|
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.
|
* 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
|
* @method bottom
|
||||||
* @param {Number} value
|
* @param {number} value
|
||||||
**/
|
**/
|
||||||
set: function (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.
|
* 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.
|
* However it does affect the width property.
|
||||||
* @method right
|
* @method right
|
||||||
* @return {Number}
|
* @return {number}
|
||||||
**/
|
**/
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.x + this.width;
|
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.
|
* 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.
|
* However it does affect the width property.
|
||||||
* @method right
|
* @method right
|
||||||
* @param {Number} value
|
* @param {number} value
|
||||||
**/
|
**/
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
*
|
*
|
||||||
* @class Circle
|
* @class Circle
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle of this 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 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 radius {number} The radius of the circle
|
||||||
*/
|
*/
|
||||||
PIXI.Circle = function(x, y, radius)
|
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
|
* Checks if the x, and y coords passed to this function are contained within this circle
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X 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
|
* @param y {number} The Y coord of the point to test
|
||||||
* @return {Boolean} if the x/y coords are within this polygon
|
* @return {Boolean} if the x/y coords are within this polygon
|
||||||
*/
|
*/
|
||||||
PIXI.Circle.prototype.contains = function(x, y)
|
PIXI.Circle.prototype.contains = function(x, y)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
*
|
*
|
||||||
* @class Ellipse
|
* @class Ellipse
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle 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 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 width {number} The overall height of this ellipse
|
||||||
* @param height {Number} The overall width of this ellipse
|
* @param height {number} The overall width of this ellipse
|
||||||
*/
|
*/
|
||||||
PIXI.Ellipse = function(x, y, width, height)
|
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
|
* Checks if the x, and y coords passed to this function are contained within this ellipse
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X 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
|
* @param y {number} The Y coord of the point to test
|
||||||
* @return {Boolean} if the x/y coords are within this ellipse
|
* @return {Boolean} if the x/y coords are within this ellipse
|
||||||
*/
|
*/
|
||||||
PIXI.Ellipse.prototype.contains = function(x, y)
|
PIXI.Ellipse.prototype.contains = function(x, y)
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
*
|
*
|
||||||
* @class Point
|
* @class Point
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param x {Number} position of the point
|
* @param x {number} position of the point
|
||||||
* @param y {Number} position of the point
|
* @param y {number} position of the point
|
||||||
*/
|
*/
|
||||||
PIXI.Point = function(x, y)
|
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
|
* Checks if the x, and y coords passed to this function are contained within this polygon
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X 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
|
* @param y {number} The Y coord of the point to test
|
||||||
* @return {Boolean} if the x/y coords are within this polygon
|
* @return {Boolean} if the x/y coords are within this polygon
|
||||||
*/
|
*/
|
||||||
PIXI.Polygon.prototype.contains = function(x, y)
|
PIXI.Polygon.prototype.contains = function(x, y)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
*
|
*
|
||||||
* @class Rectangle
|
* @class Rectangle
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param x {Number} The X coord of the upper-left corner of the 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 y {number} The Y coord of the upper-left corner of the rectangle
|
||||||
* @param width {Number} The overall wisth of this rectangle
|
* @param width {number} The overall wisth of this rectangle
|
||||||
* @param height {Number} The overall height of this rectangle
|
* @param height {number} The overall height of this rectangle
|
||||||
*/
|
*/
|
||||||
PIXI.Rectangle = function(x, y, width, height)
|
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
|
* Checks if the x, and y coords passed to this function are contained within this Rectangle
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X 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
|
* @param y {number} The Y coord of the point to test
|
||||||
* @return {Boolean} if the x/y coords are within this Rectangle
|
* @return {Boolean} if the x/y coords are within this Rectangle
|
||||||
*/
|
*/
|
||||||
PIXI.Rectangle.prototype.contains = function(x, y)
|
PIXI.Rectangle.prototype.contains = function(x, y)
|
||||||
|
|
|
@ -134,7 +134,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
||||||
*
|
*
|
||||||
* @method addChildAt
|
* @method addChildAt
|
||||||
* @param child {DisplayObject} The child to add
|
* @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)
|
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
|
* Returns the Child at the specified index
|
||||||
*
|
*
|
||||||
* @method getChildAt
|
* @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)
|
PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,7 +96,7 @@ PIXI.MovieClip.prototype.play = function()
|
||||||
* Stops the MovieClip and goes to a specific frame
|
* Stops the MovieClip and goes to a specific frame
|
||||||
*
|
*
|
||||||
* @method gotoAndStop
|
* @method gotoAndStop
|
||||||
* @param frameNumber {Number} frame index to stop at
|
* @param frameNumber {number} frame index to stop at
|
||||||
*/
|
*/
|
||||||
PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber)
|
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
|
* Goes to a specific frame and begins playing the MovieClip
|
||||||
*
|
*
|
||||||
* @method gotoAndPlay
|
* @method gotoAndPlay
|
||||||
* @param frameNumber {Number} frame index to start at
|
* @param frameNumber {number} frame index to start at
|
||||||
*/
|
*/
|
||||||
PIXI.MovieClip.prototype.gotoAndPlay = function(frameNumber)
|
PIXI.MovieClip.prototype.gotoAndPlay = function(frameNumber)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* @class Stage
|
* @class Stage
|
||||||
* @extends DisplayObjectContainer
|
* @extends DisplayObjectContainer
|
||||||
* @constructor
|
* @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
|
* like: 0xFFFFFF for white
|
||||||
* @param interactive {Boolean} enable / disable interaction (default is false)
|
* @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
|
* Sets the background color for the stage
|
||||||
*
|
*
|
||||||
* @method setBackgroundColor
|
* @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
|
* like: 0xFFFFFF for white
|
||||||
*/
|
*/
|
||||||
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
* @extends DisplayObjectContainer
|
* @extends DisplayObjectContainer
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param texture {Texture} the texture of the tiling sprite
|
* @param texture {Texture} the texture of the tiling sprite
|
||||||
* @param width {Number} the width of the tiling sprite
|
* @param width {number} the width of the tiling sprite
|
||||||
* @param height {Number} the height of the tiling sprite
|
* @param height {number} the height of the tiling sprite
|
||||||
*/
|
*/
|
||||||
PIXI.TilingSprite = function(texture, width, height)
|
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.
|
* Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.
|
||||||
*
|
*
|
||||||
* @method lineStyle
|
* @method lineStyle
|
||||||
* @param lineWidth {Number} width 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 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 alpha {number} alpha of the line to draw, will update the object's stored style
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha)
|
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).
|
* Moves the current drawing position to (x, y).
|
||||||
*
|
*
|
||||||
* @method moveTo
|
* @method moveTo
|
||||||
* @param x {Number} the X coord to move to
|
* @param x {number} the X coord to move to
|
||||||
* @param y {Number} the Y coord to move to
|
* @param y {number} the Y coord to move to
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.moveTo = function(x, y)
|
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).
|
* the current drawing position is then set to (x, y).
|
||||||
*
|
*
|
||||||
* @method lineTo
|
* @method lineTo
|
||||||
* @param x {Number} the X coord to draw to
|
* @param x {number} the X coord to draw to
|
||||||
* @param y {Number} the Y coord to draw to
|
* @param y {number} the Y coord to draw to
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.lineTo = function(x, y)
|
PIXI.Graphics.prototype.lineTo = function(x, y)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ PIXI.Graphics.prototype.lineTo = function(x, y)
|
||||||
*
|
*
|
||||||
* @method beginFill
|
* @method beginFill
|
||||||
* @param color {uint} the color of the fill
|
* @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)
|
PIXI.Graphics.prototype.beginFill = function(color, alpha)
|
||||||
{
|
{
|
||||||
|
@ -150,10 +150,10 @@ PIXI.Graphics.prototype.endFill = function()
|
||||||
/**
|
/**
|
||||||
* @method drawRect
|
* @method drawRect
|
||||||
*
|
*
|
||||||
* @param x {Number} The X coord of the top-left 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 y {number} The Y coord of the top-left of the rectangle
|
||||||
* @param width {Number} The width of the rectangle
|
* @param width {number} The width of the rectangle
|
||||||
* @param height {Number} The height of the rectangle
|
* @param height {number} The height of the rectangle
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
|
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.
|
* Draws a circle.
|
||||||
*
|
*
|
||||||
* @method drawCircle
|
* @method drawCircle
|
||||||
* @param x {Number} The X coord of the center 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 y {number} The Y coord of the center of the circle
|
||||||
* @param radius {Number} The radius of the circle
|
* @param radius {number} The radius of the circle
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
||||||
{
|
{
|
||||||
|
@ -191,10 +191,10 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
||||||
* Draws an elipse.
|
* Draws an elipse.
|
||||||
*
|
*
|
||||||
* @method drawElipse
|
* @method drawElipse
|
||||||
* @param x {Number}
|
* @param x {number}
|
||||||
* @param y {Number}
|
* @param y {number}
|
||||||
* @param width {Number}
|
* @param width {number}
|
||||||
* @param height {Number}
|
* @param height {number}
|
||||||
*/
|
*/
|
||||||
PIXI.Graphics.prototype.drawElipse = function( x, y, width, height)
|
PIXI.Graphics.prototype.drawElipse = function( x, y, width, height)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
*
|
*
|
||||||
* @class CanvasRenderer
|
* @class CanvasRenderer
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param width=0 {Number} the width 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 height=0 {number} the height of the canvas view
|
||||||
* @param view {Canvas} the canvas to use as a view, optional
|
* @param view {Canvas} the canvas to use as a view, optional
|
||||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
* @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
|
* resizes the canvas view to the specified width and height
|
||||||
*
|
*
|
||||||
* @method resize
|
* @method resize
|
||||||
* @param width {Number} the new width of the canvas view
|
* @param width {number} the new width of the canvas view
|
||||||
* @param height {Number} the new height of the canvas view
|
* @param height {number} the new height of the canvas view
|
||||||
*/
|
*/
|
||||||
PIXI.CanvasRenderer.prototype.resize = function(width, height)
|
PIXI.CanvasRenderer.prototype.resize = function(width, height)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,8 +16,8 @@ PIXI.gl;
|
||||||
*
|
*
|
||||||
* @class WebGLRenderer
|
* @class WebGLRenderer
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param width=0 {Number} the width 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 height=0 {number} the height of the canvas view
|
||||||
* @param view {Canvas} the canvas to use as a view, optional
|
* @param view {Canvas} the canvas to use as a view, optional
|
||||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
* @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)
|
* @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
|
* resizes the webGL view to the specified width and height
|
||||||
*
|
*
|
||||||
* @method resize
|
* @method resize
|
||||||
* @param width {Number} the new width of the webGL view
|
* @param width {number} the new width of the webGL view
|
||||||
* @param height {Number} the new height of the webGL view
|
* @param height {number} the new height of the webGL view
|
||||||
*/
|
*/
|
||||||
PIXI.WebGLRenderer.prototype.resize = function(width, height)
|
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.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.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.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.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)
|
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.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.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.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.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)
|
PIXI.Text.prototype.setStyle = function(style)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
@class RenderTexture
|
@class RenderTexture
|
||||||
@extends Texture
|
@extends Texture
|
||||||
@constructor
|
@constructor
|
||||||
@param width {Number} The width of the render texture
|
@param width {number} The width of the render texture
|
||||||
@param height {Number} The height of the render texture
|
@param height {number} The height of the render texture
|
||||||
*/
|
*/
|
||||||
PIXI.RenderTexture = function(width, height)
|
PIXI.RenderTexture = function(width, height)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
*
|
*
|
||||||
* @method autoDetectRenderer
|
* @method autoDetectRenderer
|
||||||
* @static
|
* @static
|
||||||
* @param width {Number} the width of the renderers view
|
* @param width {number} the width of the renderers view
|
||||||
* @param height {Number} the height 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 view {Canvas} the canvas to use as a view, optional
|
||||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
* @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)
|
* @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
|
* Converts a hex color number to an [R, G, B] array
|
||||||
*
|
*
|
||||||
* @method HEXtoRGB
|
* @method HEXtoRGB
|
||||||
* @param hex {Number}
|
* @param hex {number}
|
||||||
*/
|
*/
|
||||||
function HEXtoRGB(hex) {
|
function HEXtoRGB(hex) {
|
||||||
return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
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 {Phaser.Game} game - Reference to the current game instance.
|
||||||
* @param {string} key - Asset key for the sound.
|
* @param {string} key - Asset key for the sound.
|
||||||
* @param {number} volume - Default value for the volume.
|
* @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) {
|
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.
|
* Whether or not the sound will loop.
|
||||||
* @property {bool} loop
|
* @property {boolean} loop
|
||||||
*/
|
*/
|
||||||
this.loop = loop;
|
this.loop = loop;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Phaser.Sound = function (game, key, volume, loop) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boolean indicating whether the game is on "mute".
|
* Boolean indicating whether the game is on "mute".
|
||||||
* @property {bool} _muted
|
* @property {boolean} _muted
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ Phaser.Sound = function (game, key, volume, loop) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boolean indicating whether the sound should start automatically.
|
* Boolean indicating whether the sound should start automatically.
|
||||||
* @property {bool} autoplay
|
* @property {boolean} autoplay
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.autoplay = false;
|
this.autoplay = false;
|
||||||
|
@ -127,14 +127,14 @@ Phaser.Sound = function (game, key, volume, loop) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} paused
|
* @property {boolean} paused
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} isPlaying
|
* @property {boolean} isPlaying
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isPlaying = false;
|
this.isPlaying = false;
|
||||||
|
@ -148,21 +148,21 @@ Phaser.Sound = function (game, key, volume, loop) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} pendingPlayback
|
* @property {boolean} pendingPlayback
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.pendingPlayback = false;
|
this.pendingPlayback = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} override
|
* @property {boolean} override
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.override = false;
|
this.override = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} usingWebAudio
|
* @property {boolean} usingWebAudio
|
||||||
*/
|
*/
|
||||||
this.usingWebAudio = this.game.sound.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 {string} marker - Assets key of the sound you want to play.
|
||||||
* @param {number} position - The starting position.
|
* @param {number} position - The starting position.
|
||||||
* @param {number} [volume] - Volume of the sound you want to play.
|
* @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.
|
* @param {Description} forceRestart - Description.
|
||||||
* @return {Sound} The playing sound object.
|
* @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 {string} marker - Assets key of the sound you want to play.
|
||||||
* @param {number} position - The starting position.
|
* @param {number} position - The starting position.
|
||||||
* @param {number} [volume] - Volume of the sound you want to play.
|
* @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) {
|
restart: function (marker, position, volume, loop) {
|
||||||
|
|
||||||
|
@ -691,7 +691,7 @@ Phaser.Sound.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Sound.prototype, "isDecoding", {
|
Object.defineProperty(Phaser.Sound.prototype, "isDecoding", {
|
||||||
|
|
||||||
|
@ -703,7 +703,7 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.Sound.prototype, "isDecoded", {
|
Object.defineProperty(Phaser.Sound.prototype, "isDecoded", {
|
||||||
|
|
||||||
|
@ -715,10 +715,10 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool} Whether or not the sound is muted.
|
* @return {boolean} Whether or not the sound is muted.
|
||||||
*//**
|
*//**
|
||||||
* Mutes sound.
|
* 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", {
|
Object.defineProperty(Phaser.Sound.prototype, "mute", {
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ Phaser.SoundManager = function (game) {
|
||||||
this.onSoundDecode = new Phaser.Signal;
|
this.onSoundDecode = new Phaser.Signal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _muted - Description.
|
* @property {boolean} _muted - Description.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -61,25 +61,25 @@ Phaser.SoundManager = function (game) {
|
||||||
this.context = null;
|
this.context = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} usingWebAudio - Description.
|
* @property {boolean} usingWebAudio - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.usingWebAudio = true;
|
this.usingWebAudio = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} usingAudioTag - Description.
|
* @property {boolean} usingAudioTag - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.usingAudioTag = false;
|
this.usingAudioTag = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} noAudio - Description.
|
* @property {boolean} noAudio - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.noAudio = false;
|
this.noAudio = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} touchLocked - Description.
|
* @property {boolean} touchLocked - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.touchLocked = false;
|
this.touchLocked = false;
|
||||||
|
@ -323,7 +323,7 @@ Phaser.SoundManager.prototype = {
|
||||||
* @method add
|
* @method add
|
||||||
* @param {string} key - Asset key for the sound.
|
* @param {string} key - Asset key for the sound.
|
||||||
* @param {number} volume - Default value for the volume.
|
* @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) {
|
add: function (key, volume, loop) {
|
||||||
|
|
||||||
|
@ -344,10 +344,10 @@ Phaser.SoundManager.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A global audio mute toggle.
|
* 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.
|
* 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", {
|
Object.defineProperty(Phaser.SoundManager.prototype, "mute", {
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ Phaser.Canvas = {
|
||||||
* @method addToDOM
|
* @method addToDOM
|
||||||
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
|
* @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 {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.
|
* @return {HTMLCanvasElement} Returns the source canvas.
|
||||||
*/
|
*/
|
||||||
addToDOM: function (canvas, parent, overflowHidden) {
|
addToDOM: function (canvas, parent, overflowHidden) {
|
||||||
|
@ -191,7 +191,7 @@ Phaser.Canvas = {
|
||||||
*
|
*
|
||||||
* @method setSmoothingEnabled
|
* @method setSmoothingEnabled
|
||||||
* @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on.
|
* @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.
|
* @return {CanvasRenderingContext2D} Returns the source context.
|
||||||
*/
|
*/
|
||||||
setSmoothingEnabled: function (context, value) {
|
setSmoothingEnabled: function (context, value) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ Phaser.Device = function () {
|
||||||
/**
|
/**
|
||||||
* An optional 'fix' for the horrendous Android stock browser bug
|
* An optional 'fix' for the horrendous Android stock browser bug
|
||||||
* {@link https://code.google.com/p/android/issues/detail?id=39247}
|
* {@link https://code.google.com/p/android/issues/detail?id=39247}
|
||||||
* @property {bool} patchAndroidClearRectBug - Description.
|
* @property {boolean} patchAndroidClearRectBug - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.patchAndroidClearRectBug = false;
|
this.patchAndroidClearRectBug = false;
|
||||||
|
@ -27,43 +27,43 @@ Phaser.Device = function () {
|
||||||
// Operating System
|
// Operating System
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} desktop - Is running desktop?
|
* @property {boolean} desktop - Is running desktop?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.desktop = false;
|
this.desktop = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} iOS - Is running on iOS?
|
* @property {boolean} iOS - Is running on iOS?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.iOS = false;
|
this.iOS = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} android - Is running on android?
|
* @property {boolean} android - Is running on android?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.android = false;
|
this.android = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} chromeOS - Is running on chromeOS?
|
* @property {boolean} chromeOS - Is running on chromeOS?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.chromeOS = false;
|
this.chromeOS = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} linux - Is running on linux?
|
* @property {boolean} linux - Is running on linux?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.linux = false;
|
this.linux = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} maxOS - Is running on maxOS?
|
* @property {boolean} maxOS - Is running on maxOS?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.macOS = false;
|
this.macOS = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} windows - Is running on windows?
|
* @property {boolean} windows - Is running on windows?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.windows = false;
|
this.windows = false;
|
||||||
|
@ -71,61 +71,61 @@ Phaser.Device = function () {
|
||||||
// Features
|
// Features
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} canvas - Is canvas available?
|
* @property {boolean} canvas - Is canvas available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.canvas = false;
|
this.canvas = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} file - Is file available?
|
* @property {boolean} file - Is file available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.file = false;
|
this.file = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} fileSystem - Is fileSystem available?
|
* @property {boolean} fileSystem - Is fileSystem available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.fileSystem = false;
|
this.fileSystem = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} localStorage - Is localStorage available?
|
* @property {boolean} localStorage - Is localStorage available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.localStorage = false;
|
this.localStorage = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} webGL - Is webGL available?
|
* @property {boolean} webGL - Is webGL available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.webGL = false;
|
this.webGL = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} worker - Is worker available?
|
* @property {boolean} worker - Is worker available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.worker = false;
|
this.worker = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} touch - Is touch available?
|
* @property {boolean} touch - Is touch available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.touch = false;
|
this.touch = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} mspointer - Is mspointer available?
|
* @property {boolean} mspointer - Is mspointer available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.mspointer = false;
|
this.mspointer = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} css3D - Is css3D available?
|
* @property {boolean} css3D - Is css3D available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.css3D = false;
|
this.css3D = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} pointerLock - Is Pointer Lock available?
|
* @property {boolean} pointerLock - Is Pointer Lock available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.pointerLock = false;
|
this.pointerLock = false;
|
||||||
|
@ -133,31 +133,31 @@ Phaser.Device = function () {
|
||||||
// Browser
|
// Browser
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} arora - Is running in arora?
|
* @property {boolean} arora - Is running in arora?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.arora = false;
|
this.arora = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} chrome - Is running in chrome?
|
* @property {boolean} chrome - Is running in chrome?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.chrome = false;
|
this.chrome = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} epiphany - Is running in epiphany?
|
* @property {boolean} epiphany - Is running in epiphany?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.epiphany = false;
|
this.epiphany = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} firefox - Is running in firefox?
|
* @property {boolean} firefox - Is running in firefox?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.firefox = false;
|
this.firefox = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} ie - Is running in ie?
|
* @property {boolean} ie - Is running in ie?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.ie = false;
|
this.ie = false;
|
||||||
|
@ -169,25 +169,25 @@ Phaser.Device = function () {
|
||||||
this.ieVersion = 0;
|
this.ieVersion = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} mobileSafari - Is running in mobileSafari?
|
* @property {boolean} mobileSafari - Is running in mobileSafari?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.mobileSafari = false;
|
this.mobileSafari = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} midori - Is running in midori?
|
* @property {boolean} midori - Is running in midori?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.midori = false;
|
this.midori = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} opera - Is running in opera?
|
* @property {boolean} opera - Is running in opera?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.opera = false;
|
this.opera = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} safari - Is running in safari?
|
* @property {boolean} safari - Is running in safari?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.safari = false;
|
this.safari = false;
|
||||||
|
@ -196,49 +196,49 @@ Phaser.Device = function () {
|
||||||
// Audio
|
// Audio
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} audioData - Are Audio tags available?
|
* @property {boolean} audioData - Are Audio tags available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.audioData = false;
|
this.audioData = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} webAudio - Is the WebAudio API available?
|
* @property {boolean} webAudio - Is the WebAudio API available?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.webAudio = false;
|
this.webAudio = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} ogg - Can this device play ogg files?
|
* @property {boolean} ogg - Can this device play ogg files?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.ogg = false;
|
this.ogg = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} opus - Can this device play opus files?
|
* @property {boolean} opus - Can this device play opus files?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.opus = false;
|
this.opus = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} mp3 - Can this device play mp3 files?
|
* @property {boolean} mp3 - Can this device play mp3 files?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.mp3 = false;
|
this.mp3 = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} wav - Can this device play wav files?
|
* @property {boolean} wav - Can this device play wav files?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.wav = false;
|
this.wav = false;
|
||||||
/**
|
/**
|
||||||
* Can this device play m4a files?
|
* 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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.m4a = false;
|
this.m4a = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} webm - Can this device play webm files?
|
* @property {boolean} webm - Can this device play webm files?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.webm = false;
|
this.webm = false;
|
||||||
|
@ -246,19 +246,19 @@ Phaser.Device = function () {
|
||||||
// Device
|
// Device
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} iPhone - Is running on iPhone?
|
* @property {boolean} iPhone - Is running on iPhone?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.iPhone = false;
|
this.iPhone = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} iPhone4 - Is running on iPhone4?
|
* @property {boolean} iPhone4 - Is running on iPhone4?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.iPhone4 = false;
|
this.iPhone4 = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} iPad - Is running on iPad?
|
* @property {boolean} iPad - Is running on iPad?
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.iPad = false;
|
this.iPad = false;
|
||||||
|
@ -496,7 +496,7 @@ Phaser.Device.prototype = {
|
||||||
/**
|
/**
|
||||||
* Check whether the console is open.
|
* Check whether the console is open.
|
||||||
* @method isConsoleOpen
|
* @method isConsoleOpen
|
||||||
* @return {bool} True if console is open.
|
* @return {boolean} True if console is open.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isConsoleOpen: function () {
|
isConsoleOpen: function () {
|
||||||
|
|
|
@ -21,13 +21,13 @@ Phaser.RequestAnimationFrame = function(game) {
|
||||||
this.game = game;
|
this.game = game;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _isSetTimeOut - Description.
|
* @property {boolean} _isSetTimeOut - Description.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this._isSetTimeOut = false;
|
this._isSetTimeOut = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} isRunning - Description.
|
* @property {boolean} isRunning - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
|
@ -135,7 +135,7 @@ Phaser.RequestAnimationFrame.prototype = {
|
||||||
/**
|
/**
|
||||||
* Is the browser using setTimeout?
|
* Is the browser using setTimeout?
|
||||||
* @method isSetTimeOut
|
* @method isSetTimeOut
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
**/
|
**/
|
||||||
isSetTimeOut: function () {
|
isSetTimeOut: function () {
|
||||||
return this._isSetTimeOut;
|
return this._isSetTimeOut;
|
||||||
|
@ -144,7 +144,7 @@ Phaser.RequestAnimationFrame.prototype = {
|
||||||
/**
|
/**
|
||||||
* Is the browser using requestAnimationFrame?
|
* Is the browser using requestAnimationFrame?
|
||||||
* @method isRAF
|
* @method isRAF
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
**/
|
**/
|
||||||
isRAF: function () {
|
isRAF: function () {
|
||||||
return (this._isSetTimeOut === false);
|
return (this._isSetTimeOut === false);
|
||||||
|
|
|
@ -25,25 +25,25 @@ Phaser.StageScaleMode = function (game, width, height) {
|
||||||
this._startHeight = 0;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.forceLandscape = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.forcePortrait = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.incorrectOrientation = false;
|
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>
|
<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>
|
<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
|
* @default
|
||||||
|
@ -51,7 +51,7 @@ Phaser.StageScaleMode = function (game, width, height) {
|
||||||
this.pageAlignHorizontally = false;
|
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.
|
<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>
|
<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
|
* @default
|
||||||
|
@ -511,7 +511,7 @@ Phaser.StageScaleMode.prototype = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* @return {bool}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", {
|
Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", {
|
||||||
|
|
||||||
|
|
|
@ -27,43 +27,43 @@ Phaser.Tile = function (game, tilemap, index, width, height) {
|
||||||
this.mass = 1.0;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collideNone = true;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collideLeft = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collideRight = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collideUp = false;
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collideDown = false;
|
this.collideDown = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} separateX - Enable separation at x-axis.
|
* @property {boolean} separateX - Enable separation at x-axis.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.separateX = true;
|
this.separateX = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} separateY - Enable separation at y-axis.
|
* @property {boolean} separateY - Enable separation at y-axis.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.separateY = true;
|
this.separateY = true;
|
||||||
|
@ -74,7 +74,7 @@ Phaser.Tile = function (game, tilemap, index, width, height) {
|
||||||
this.game = game;
|
this.game = game;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} tilemap - The tilemap this tile belongs to.
|
* @property {boolean} tilemap - The tilemap this tile belongs to.
|
||||||
*/
|
*/
|
||||||
this.tilemap = tilemap;
|
this.tilemap = tilemap;
|
||||||
|
|
||||||
|
@ -108,13 +108,13 @@ Phaser.Tile.prototype = {
|
||||||
/**
|
/**
|
||||||
* Set collision configs.
|
* Set collision configs.
|
||||||
* @method setCollision
|
* @method setCollision
|
||||||
* @param {bool} left - Indicating collide with any object on the left.
|
* @param {boolean} left - Indicating collide with any object on the left.
|
||||||
* @param {bool} right - Indicating collide with any object on the right.
|
* @param {boolean} right - Indicating collide with any object on the right.
|
||||||
* @param {bool} up - Indicating collide with any object on the top.
|
* @param {boolean} up - Indicating collide with any object on the top.
|
||||||
* @param {bool} down - Indicating collide with any object on the bottom.
|
* @param {boolean} down - Indicating collide with any object on the bottom.
|
||||||
* @param {bool} reset - Description.
|
* @param {boolean} reset - Description.
|
||||||
* @param {bool} separateX - Separate at x-axis.
|
* @param {boolean} separateX - Separate at x-axis.
|
||||||
* @param {bool} separateY - Separate at y-axis.
|
* @param {boolean} separateY - Separate at y-axis.
|
||||||
*/
|
*/
|
||||||
setCollision: function (left, right, up, down, reset, separateX, separateY) {
|
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.
|
* 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
|
* @method bottom
|
||||||
* @return {Number}
|
* @return {number}
|
||||||
**/
|
**/
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.y + this.height;
|
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.
|
* 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.
|
* However it does affect the width property.
|
||||||
* @method right
|
* @method right
|
||||||
* @return {Number}
|
* @return {number}
|
||||||
**/
|
**/
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.x + this.width;
|
return this.x + this.width;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* @param {string} key - Asset key for this map.
|
* @param {string} key - Asset key for this map.
|
||||||
* @param {object} x - Description.
|
* @param {object} x - Description.
|
||||||
* @param {object} y - 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} tileWidth - Width of tiles in this map (used for CSV maps).
|
||||||
* @param {number} tileHeight - Height 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;
|
this.renderOrderID = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} collisionCallback - Tilemap collision callback.
|
* @property {boolean} collisionCallback - Tilemap collision callback.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.collisionCallback = null;
|
this.collisionCallback = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} exists - Description.
|
* @property {boolean} exists - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
this.exists = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} visible - Description.
|
* @property {boolean} visible - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} tiles - Description.
|
* @property {boolean} tiles - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.tiles = [];
|
this.tiles = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} layers - Description.
|
* @property {boolean} layers - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.layers = [];
|
this.layers = [];
|
||||||
|
@ -268,9 +268,9 @@ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) {
|
||||||
* @param {number} start - First index of tiles.
|
* @param {number} start - First index of tiles.
|
||||||
* @param {number} end - Last index of tiles.
|
* @param {number} end - Last index of tiles.
|
||||||
* @param {number} collision - Bit field of flags. (see Tile.allowCollision)
|
* @param {number} collision - Bit field of flags. (see Tile.allowCollision)
|
||||||
* @param {bool} resetCollisions - Reset collision flags before set.
|
* @param {boolean} resetCollisions - Reset collision flags before set.
|
||||||
* @param {bool} separateX - Enable separate at x-axis.
|
* @param {boolean} separateX - Enable separate at x-axis.
|
||||||
* @param {bool} separateY - Enable separate at y-axis.
|
* @param {boolean} separateY - Enable separate at y-axis.
|
||||||
*/
|
*/
|
||||||
Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) {
|
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.
|
* 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[]} 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 {number} collision - Bit field of flags (see Tile.allowCollision).
|
||||||
* @param {bool} resetCollisions - Reset collision flags before set.
|
* @param {boolean} resetCollisions - Reset collision flags before set.
|
||||||
* @param {bool} left - Indicating collide with any object on the left.
|
* @param {boolean} left - Indicating collide with any object on the left.
|
||||||
* @param {bool} right - Indicating collide with any object on the right.
|
* @param {boolean} right - Indicating collide with any object on the right.
|
||||||
* @param {bool} up - Indicating collide with any object on the top.
|
* @param {boolean} up - Indicating collide with any object on the top.
|
||||||
* @param {bool} down - Indicating collide with any object on the bottom.
|
* @param {boolean} down - Indicating collide with any object on the bottom.
|
||||||
* @param {bool} separateX - Enable separate at x-axis.
|
* @param {boolean} separateX - Enable separate at x-axis.
|
||||||
* @param {bool} separateY - Enable separate at y-axis.
|
* @param {boolean} separateY - Enable separate at y-axis.
|
||||||
*/
|
*/
|
||||||
Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) {
|
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} objectOrGroup - Target object of group you want to check.
|
||||||
* @param {Function} callback - This is called if objectOrGroup collides the tilemap.
|
* @param {Function} callback - This is called if objectOrGroup collides the tilemap.
|
||||||
* @param {object} context - Callback will be called with this context.
|
* @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) {
|
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.
|
* Check whether this tilemap collides with the given game object.
|
||||||
* @param {GameObject} object - Target object you want to check.
|
* @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) {
|
Phaser.Tilemap.prototype.collideGameObject = function (object) {
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,13 @@
|
||||||
Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) {
|
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
|
* @default
|
||||||
*/
|
*/
|
||||||
this.exists = true;
|
this.exists = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} visible - Controls whether draw() are automatically called.
|
* @property {boolean} visible - Controls whether draw() are automatically called.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.visible = true;
|
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} [y] - Y position (in tiles) of block's left-top corner.
|
||||||
* @param {number} [width] - width of block.
|
* @param {number} [width] - width of block.
|
||||||
* @param {number} [height] - height 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) {
|
getTempBlock: function (x, y, width, height, collisionOnly) {
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ Phaser.TilemapRenderer.prototype = {
|
||||||
* Render a tilemap to a canvas.
|
* Render a tilemap to a canvas.
|
||||||
* @method render
|
* @method render
|
||||||
* @param tilemap {Tilemap} The tilemap data to render.
|
* @param tilemap {Tilemap} The tilemap data to render.
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
render: function (tilemap) {
|
render: function (tilemap) {
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ Phaser.Time = function (game) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description.
|
* Description.
|
||||||
* @property {bool} _justResumed
|
* @property {boolean} _justResumed
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this._justResumed = false;
|
this._justResumed = false;
|
||||||
|
|
|
@ -67,14 +67,14 @@ Phaser.Tween = function (object, game) {
|
||||||
this._repeat = 0;
|
this._repeat = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _yoyo - Description.
|
* @property {boolean} _yoyo - Description.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this._yoyo = false;
|
this._yoyo = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _reversed - Description.
|
* @property {boolean} _reversed - Description.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -120,7 +120,7 @@ Phaser.Tween = function (object, game) {
|
||||||
this._onStartCallback = null;
|
this._onStartCallback = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} _onStartCallbackFired - Description.
|
* @property {boolean} _onStartCallbackFired - Description.
|
||||||
* @private
|
* @private
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
@ -148,7 +148,7 @@ Phaser.Tween = function (object, game) {
|
||||||
this._pausedTime = 0;
|
this._pausedTime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} pendingDelete - Description.
|
* @property {boolean} pendingDelete - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.pendingDelete = false;
|
this.pendingDelete = false;
|
||||||
|
@ -169,7 +169,7 @@ Phaser.Tween = function (object, game) {
|
||||||
this.onComplete = new Phaser.Signal();
|
this.onComplete = new Phaser.Signal();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} isRunning - Description.
|
* @property {boolean} isRunning - Description.
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
|
@ -185,9 +185,9 @@ Phaser.Tween.prototype = {
|
||||||
* @param {object} properties - Properties you want to tween.
|
* @param {object} properties - Properties you want to tween.
|
||||||
* @param {number} duration - Duration of this tween.
|
* @param {number} duration - Duration of this tween.
|
||||||
* @param {function} ease - Easing function.
|
* @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 {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.
|
* @param {Phaser.Tween} yoyo - Description.
|
||||||
* @return {Phaser.Tween} Itself.
|
* @return {Phaser.Tween} Itself.
|
||||||
*/
|
*/
|
||||||
|
@ -471,7 +471,7 @@ Phaser.Tween.prototype = {
|
||||||
*
|
*
|
||||||
* @method update
|
* @method update
|
||||||
* @param {number} time - Description.
|
* @param {number} time - Description.
|
||||||
* @return {bool} Description.
|
* @return {boolean} Description.
|
||||||
*/
|
*/
|
||||||
update: function ( time ) {
|
update: function ( time ) {
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ Phaser.TweenManager.prototype = {
|
||||||
* Update all the tween objects you added to this manager.
|
* Update all the tween objects you added to this manager.
|
||||||
*
|
*
|
||||||
* @method update
|
* @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 () {
|
update: function () {
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ Phaser.Utils.Debug = function (game) {
|
||||||
this.lineHeight = 16;
|
this.lineHeight = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {bool} renderShadow - Description.
|
* @property {boolean} renderShadow - Description.
|
||||||
*/
|
*/
|
||||||
this.renderShadow = true;
|
this.renderShadow = true;
|
||||||
|
|
||||||
|
@ -185,8 +185,8 @@ Phaser.Utils.Debug.prototype = {
|
||||||
* Description.
|
* Description.
|
||||||
* @method renderSpriteCorners
|
* @method renderSpriteCorners
|
||||||
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
|
* @param {Phaser.Sprite} sprite - The sprite to be rendered.
|
||||||
* @param {bool} showText - Description.
|
* @param {boolean} showText - Description.
|
||||||
* @param {bool} showBounds - Description.
|
* @param {boolean} showBounds - Description.
|
||||||
* @param {string} color - Description.
|
* @param {string} color - Description.
|
||||||
*/
|
*/
|
||||||
renderSpriteCorners: function (sprite, showText, showBounds, color) {
|
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.
|
* Renders the Pointer.circle object onto the stage in green if down or red if up.
|
||||||
* @method renderDebug
|
* @method renderDebug
|
||||||
* @param {Description} pointer - Description.
|
* @param {Description} pointer - Description.
|
||||||
* @param {bool} hideIfUp - Description.
|
* @param {boolean} hideIfUp - Description.
|
||||||
* @param {string} downColor - Description.
|
* @param {string} downColor - Description.
|
||||||
* @param {string} upColor - Description.
|
* @param {string} upColor - Description.
|
||||||
* @param {string} color - Description.
|
* @param {string} color - Description.
|
||||||
|
|
|
@ -57,7 +57,7 @@ Phaser.Utils = {
|
||||||
* This is a slightly modified version of jQuery.isPlainObject.
|
* This is a slightly modified version of jQuery.isPlainObject.
|
||||||
* @method isPlainObject
|
* @method isPlainObject
|
||||||
* @param {object} obj - Description.
|
* @param {object} obj - Description.
|
||||||
* @return {bool} - Description.
|
* @return {boolean} - Description.
|
||||||
*/
|
*/
|
||||||
isPlainObject: function (obj) {
|
isPlainObject: function (obj) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue