File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1431,7 +1431,24 @@ var Body = new Class({
14311431 }
14321432 else
14331433 {
1434- graphic . strokeRect ( pos . x , pos . y , this . width , this . height ) ;
1434+ //graphic.strokeRect(pos.x, pos.y, this.width, this.height);
1435+ // only draw the sides where checkCollision is true, similar to debugger in layer
1436+ if ( this . checkCollision . up )
1437+ {
1438+ graphic . lineBetween ( pos . x , pos . y , pos . x + this . width , pos . y ) ;
1439+ }
1440+ if ( this . checkCollision . right )
1441+ {
1442+ graphic . lineBetween ( pos . x + this . width , pos . y , pos . x + this . width , pos . y + this . height ) ;
1443+ }
1444+ if ( this . checkCollision . down )
1445+ {
1446+ graphic . lineBetween ( pos . x , pos . y + this . height , pos . x + this . width , pos . y + this . height ) ;
1447+ }
1448+ if ( this . checkCollision . left )
1449+ {
1450+ graphic . lineBetween ( pos . x , pos . y , pos . x , pos . y + this . height ) ;
1451+ }
14351452 }
14361453 }
14371454
You can’t perform that action at this time.
0 commit comments