mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Changed if-statements to multiple lines
Changed the if-statements to multiple lines as per ESLint config
This commit is contained in:
parent
f28df06bcf
commit
717c89d79b
1 changed files with 16 additions and 4 deletions
|
@ -1426,10 +1426,22 @@ var Body = new Class({
|
|||
{
|
||||
//graphic.strokeRect(pos.x, pos.y, this.width, this.height);
|
||||
// only draw the sides where checkCollision is true, similar to debugger in layer
|
||||
if (this.checkCollision.up) { graphic.lineBetween(pos.x, pos.y, pos.x + this.width, pos.y); }
|
||||
if (this.checkCollision.right) { graphic.lineBetween(pos.x + this.width, pos.y, pos.x + this.width, pos.y + this.height); }
|
||||
if (this.checkCollision.down) { graphic.lineBetween(pos.x, pos.y + this.height, pos.x + this.width, pos.y + this.height); }
|
||||
if (this.checkCollision.left) { graphic.lineBetween(pos.x, pos.y, pos.x, pos.y + this.height); }
|
||||
if (this.checkCollision.up)
|
||||
{
|
||||
graphic.lineBetween(pos.x, pos.y, pos.x + this.width, pos.y);
|
||||
}
|
||||
if (this.checkCollision.right)
|
||||
{
|
||||
graphic.lineBetween(pos.x + this.width, pos.y, pos.x + this.width, pos.y + this.height);
|
||||
}
|
||||
if (this.checkCollision.down)
|
||||
{
|
||||
graphic.lineBetween(pos.x, pos.y + this.height, pos.x + this.width, pos.y + this.height);
|
||||
}
|
||||
if (this.checkCollision.left)
|
||||
{
|
||||
graphic.lineBetween(pos.x, pos.y, pos.x, pos.y + this.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue