Skip to content

Commit b228e23

Browse files
committed
Added blocked debug
1 parent afd1dac commit b228e23

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,6 @@ var Body = new Class({
966966

967967
var velocity = this.velocity;
968968

969-
// this.newVelocity.set(velocity.x * delta, velocity.y * delta);
970-
971969
this.position.x += this.getMoveX(velocity.x * delta);
972970
this.position.y += this.getMoveY(velocity.y * delta);
973971
}
@@ -1161,6 +1159,11 @@ var Body = new Class({
11611159
return set;
11621160
},
11631161

1162+
getOverlapX: function (body, bias)
1163+
{
1164+
1165+
},
1166+
11641167
/**
11651168
* Sets the offset of the Body's position from its Game Object's position.
11661169
*
@@ -1549,7 +1552,7 @@ var Body = new Class({
15491552

15501553
// Bottom Left
15511554
var x3 = x1;
1552-
var y3 = this.bottom - thickness;
1555+
var y3 = this.bottom;
15531556

15541557
// Bottom Right
15551558
var x4 = x2;
@@ -1566,6 +1569,16 @@ var Body = new Class({
15661569
{
15671570
graphic.lineStyle(thickness, 0xff0000).lineBetween(x3, y3, x4, y4);
15681571
}
1572+
1573+
if (blocked.left)
1574+
{
1575+
graphic.lineStyle(thickness, 0xff0000).lineBetween(x1, y1, x3, y3);
1576+
}
1577+
1578+
if (blocked.right)
1579+
{
1580+
graphic.lineStyle(thickness, 0xff0000).lineBetween(x2, y2, x4, y4);
1581+
}
15691582
}
15701583

15711584
if (this.debugShowVelocity)

0 commit comments

Comments
 (0)