Is there a difference in terms of performance between these code examples?
if (this.game.physics.arcade.overlap(this.player, this.barels) && (this.game.time.now - this.srdicka.timecheck > this.srdicka.frequency) || (this.player.position.y > this.game.height + 100)) {
this.damage(1);
}
or
if (this.game.physics.arcade.overlap(this.player, this.barels) && (this.game.time.now - this.srdicka.timecheck > this.srdicka.frequency)) {
this.damage(1);
}
if (this.player.position.y > this.game.height + 100) {
this.damage(1);
}
I know that both work just fine but I'm not sure which of them is better.