Updated docs for 1.1.2 release.

This commit is contained in:
photonstorm
2013-11-01 18:16:52 +00:00
parent eb95ce231b
commit 3e9777e6f4
150 changed files with 6188 additions and 2252 deletions
+46 -41
View File
@@ -58,10 +58,6 @@
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Bullet.html">Bullet</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
@@ -787,28 +783,19 @@ Phaser.Physics.Arcade.prototype = {
this._mapData = tilemapLayer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true);
if (this._mapData.length > 1)
if (this._mapData.length == 0)
{
for (var i = 1; i &lt; this._mapData.length; i++)
return;
}
for (var i = 0; i &lt; this._mapData.length; i++)
{
if (this.separateTile(sprite.body, this._mapData[i]))
{
this.separateTile(sprite.body, this._mapData[i]);
if (this._result)
// They collided, is there a custom process callback?
if (processCallback)
{
// They collided, is there a custom process callback?
if (processCallback)
{
if (processCallback.call(callbackContext, sprite, this._mapData[i]))
{
this._total++;
if (collideCallback)
{
collideCallback.call(callbackContext, sprite, this._mapData[i]);
}
}
}
else
if (processCallback.call(callbackContext, sprite, this._mapData[i]))
{
this._total++;
@@ -818,6 +805,15 @@ Phaser.Physics.Arcade.prototype = {
}
}
}
else
{
this._total++;
if (collideCallback)
{
collideCallback.call(callbackContext, sprite, this._mapData[i]);
}
}
}
}
@@ -836,6 +832,11 @@ Phaser.Physics.Arcade.prototype = {
return;
}
if (group.length == 0)
{
return;
}
if (group._container.first._iNext)
{
var currentNode = group._container.first._iNext;
@@ -1236,14 +1237,15 @@ Phaser.Physics.Arcade.prototype = {
this._overlap = 0;
// The hulls overlap, let's process it
this._maxOverlap = body.deltaAbsX() + this.OVERLAP_BIAS;
// this._maxOverlap = body.deltaAbsX() + this.OVERLAP_BIAS;
if (body.deltaX() &lt; 0)
{
// Moving left
this._overlap = tile.right - body.hullX.x;
if ((this._overlap > this._maxOverlap) || body.allowCollision.left == false || tile.tile.collideRight == false)
// if ((this._overlap > this._maxOverlap) || body.allowCollision.left == false || tile.tile.collideRight == false)
if (body.allowCollision.left == false || tile.tile.collideRight == false)
{
this._overlap = 0;
}
@@ -1257,7 +1259,8 @@ Phaser.Physics.Arcade.prototype = {
// Moving right
this._overlap = body.hullX.right - tile.x;
if ((this._overlap > this._maxOverlap) || body.allowCollision.right == false || tile.tile.collideLeft == false)
// if ((this._overlap > this._maxOverlap) || body.allowCollision.right == false || tile.tile.collideLeft == false)
if (body.allowCollision.right == false || tile.tile.collideLeft == false)
{
this._overlap = 0;
}
@@ -1320,14 +1323,15 @@ Phaser.Physics.Arcade.prototype = {
this._overlap = 0;
// The hulls overlap, let's process it
this._maxOverlap = body.deltaAbsY() + this.OVERLAP_BIAS;
// this._maxOverlap = body.deltaAbsY() + this.OVERLAP_BIAS;
if (body.deltaY() &lt; 0)
{
// Moving up
this._overlap = tile.bottom - body.hullY.y;
if ((this._overlap > this._maxOverlap) || body.allowCollision.up == false || tile.tile.collideDown == false)
// if ((this._overlap > this._maxOverlap) || body.allowCollision.up == false || tile.tile.collideDown == false)
if (body.allowCollision.up == false || tile.tile.collideDown == false)
{
this._overlap = 0;
}
@@ -1341,7 +1345,8 @@ Phaser.Physics.Arcade.prototype = {
// Moving down
this._overlap = body.hullY.bottom - tile.y;
if ((this._overlap > this._maxOverlap) || body.allowCollision.down == false || tile.tile.collideUp == false)
// if ((this._overlap > this._maxOverlap) || body.allowCollision.down == false || tile.tile.collideUp == false)
if (body.allowCollision.down == false || tile.tile.collideUp == false)
{
this._overlap = 0;
}
@@ -1403,8 +1408,8 @@ Phaser.Physics.Arcade.prototype = {
*/
moveToObject: function (displayObject, destination, speed, maxTime) {
speed = speed || 60;
maxTime = maxTime || 0;
if (typeof speed === 'undefined') { speed = 60; }
if (typeof maxTime === 'undefined') { maxTime = 0; }
this._angle = Math.atan2(destination.y - displayObject.y, destination.x - displayObject.x);
@@ -1437,9 +1442,9 @@ Phaser.Physics.Arcade.prototype = {
*/
moveToPointer: function (displayObject, speed, pointer, maxTime) {
speed = speed || 60;
if (typeof speed === 'undefined') { speed = 60; }
pointer = pointer || this.game.input.activePointer;
maxTime = maxTime || 0;
if (typeof maxTime === 'undefined') { maxTime = 0; }
this._angle = this.angleToPointer(displayObject, pointer);
@@ -1474,8 +1479,8 @@ Phaser.Physics.Arcade.prototype = {
*/
moveToXY: function (displayObject, x, y, speed, maxTime) {
speed = speed || 60;
maxTime = maxTime || 0;
if (typeof speed === 'undefined') { speed = 60; }
if (typeof maxTime === 'undefined') { maxTime = 0; }
this._angle = Math.atan2(y - displayObject.y, x - displayObject.x);
@@ -1504,7 +1509,7 @@ Phaser.Physics.Arcade.prototype = {
*/
velocityFromAngle: function (angle, speed, point) {
speed = speed || 60;
if (typeof speed === 'undefined') { speed = 60; }
point = point || new Phaser.Point;
return point.setTo((Math.cos(this.game.math.degToRad(angle)) * speed), (Math.sin(this.game.math.degToRad(angle)) * speed));
@@ -1523,7 +1528,7 @@ Phaser.Physics.Arcade.prototype = {
*/
velocityFromRotation: function (rotation, speed, point) {
speed = speed || 60;
if (typeof speed === 'undefined') { speed = 60; }
point = point || new Phaser.Point;
return point.setTo((Math.cos(rotation) * speed), (Math.sin(rotation) * speed));
@@ -1542,7 +1547,7 @@ Phaser.Physics.Arcade.prototype = {
*/
accelerationFromRotation: function (rotation, speed, point) {
speed = speed || 60;
if (typeof speed === 'undefined') { speed = 60; }
point = point || new Phaser.Point;
return point.setTo((Math.cos(rotation) * speed), (Math.sin(rotation) * speed));
@@ -1689,8 +1694,8 @@ Phaser.Physics.Arcade.prototype = {
pointer = pointer || this.game.input.activePointer;
this._dx = displayObject.worldX - pointer.x;
this._dy = displayObject.worldY - pointer.y;
this._dx = displayObject.x - pointer.x;
this._dy = displayObject.y - pointer.y;
return Math.sqrt(this._dx * this._dx + this._dy * this._dy);
@@ -1772,7 +1777,7 @@ Phaser.Physics.Arcade.prototype = {
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Nov 01 2013 18:16:08 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>