Changed if-statements to multiple lines

Changed the if-statements to multiple lines as per ESLint config
This commit is contained in:
BdR76 2019-05-31 13:15:23 +02:00 committed by GitHub
parent f28df06bcf
commit 717c89d79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}
}