Added in a Group.sort demo, also updated the documentation and build files.

This commit is contained in:
photonstorm
2013-11-07 06:10:15 +00:00
parent 42cd8bd812
commit 3f99b691c9
157 changed files with 9101 additions and 1642 deletions
+53 -18
View File
@@ -242,6 +242,10 @@
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
@@ -784,28 +788,60 @@ Phaser.InputHandler.prototype = {
/**
* Is the Pointer over this Sprite?
* @method Phaser.InputHandler#pointerOver
* @param {Pointer} pointer
* @return {bool
* @param {number} [index] - The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.
* @return {boolean} True if the given pointer (if a index was given, or any pointer if not) is over this object.
*/
pointerOver: function (pointer) {
pointerOver: function (index) {
pointer = pointer || 0;
if (this.enabled)
{
if (typeof index === 'undefined')
{
for (var i = 0; i &lt; 10; i++)
{
if (this._pointerData[i].isOver)
{
return true;
}
}
}
else
{
return this._pointerData[index].isOver;
}
}
return this._pointerData[pointer].isOver;
return false;
},
/**
* Is the Pointer outside of this Sprite?
* @method Phaser.InputHandler#pointerOut
* @param {Pointer} pointer
* @return {boolean}
* @param {number} [index] - The ID number of a Pointer to check. If you don't provide a number it will check all Pointers.
* @return {boolean} True if the given pointer (if a index was given, or any pointer if not) is out of this object.
*/
pointerOut: function (pointer) {
pointer = pointer || 0;
if (this.enabled)
{
if (typeof index === 'undefined')
{
for (var i = 0; i &lt; 10; i++)
{
if (this._pointerData[i].isOut)
{
return true;
}
}
}
else
{
return this._pointerData[index].isOut;
}
}
return this._pointerData[pointer].isOut;
return false;
},
@@ -881,12 +917,13 @@ Phaser.InputHandler.prototype = {
},
/**
* Description.
* @method Phaser.InputHandler#checkPixel
* @param {Description} x - Description.
* @param {Description} y - Description.
* @return {boolean}
*/
* Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.
* It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.
* @method Phaser.InputHandler#checkPixel
* @param {number} x - The x coordinate to check.
* @param {number} y - The y coordinate to check.
* @return {boolean} true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha
*/
checkPixel: function (x, y) {
// Grab a pixel from our image into the hitCanvas and then test it
@@ -894,8 +931,6 @@ Phaser.InputHandler.prototype = {
{
this.game.input.hitContext.clearRect(0, 0, 1, 1);
// This will fail if the image is part of a texture atlas - need to modify the x/y values here
x += this.sprite.texture.frame.x;
y += this.sprite.texture.frame.y;
@@ -1452,7 +1487,7 @@ Phaser.InputHandler.prototype = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Fri Nov 01 2013 18:16:08 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>