Merge pull request #571 from dreadhorse/dev

Ninja world collision to check right and bottom bounds
This commit is contained in:
Richard Davey 2014-03-16 00:41:51 +00:00
commit 227810ee01
3 changed files with 6 additions and 6 deletions

View file

@ -321,7 +321,7 @@ Phaser.Physics.Ninja.AABB.prototype = {
}
else
{
dx = (this.pos.x + this.xw) - this.system.bounds.width;
dx = (this.pos.x + this.xw) - this.system.bounds.right;
if (0 < dx)
{
@ -337,7 +337,7 @@ Phaser.Physics.Ninja.AABB.prototype = {
}
else
{
dy = (this.pos.y + this.yw) - this.system.bounds.height;
dy = (this.pos.y + this.yw) - this.system.bounds.bottom;
if (0 < dy)
{

View file

@ -219,7 +219,7 @@ Phaser.Physics.Ninja.Circle.prototype = {
}
else
{
dx = (this.pos.x + this.radius) - this.system.bounds.width;
dx = (this.pos.x + this.radius) - this.system.bounds.right;
if (0 < dx)
{
@ -235,7 +235,7 @@ Phaser.Physics.Ninja.Circle.prototype = {
}
else
{
dy = (this.pos.y + this.radius) - this.system.bounds.height;
dy = (this.pos.y + this.radius) - this.system.bounds.bottom;
if (0 < dy)
{

View file

@ -165,7 +165,7 @@ Phaser.Physics.Ninja.Tile.prototype = {
}
else
{
dx = (this.pos.x + this.xw) - this.system.bounds.width;
dx = (this.pos.x + this.xw) - this.system.bounds.right;
if (0 < dx)
{
@ -181,7 +181,7 @@ Phaser.Physics.Ninja.Tile.prototype = {
}
else
{
dy = (this.pos.y + this.yw) - this.system.bounds.height;
dy = (this.pos.y + this.yw) - this.system.bounds.bottom;
if (0 < dy)
{