mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Merge pull request #571 from dreadhorse/dev
Ninja world collision to check right and bottom bounds
This commit is contained in:
commit
227810ee01
3 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue