How can I rewrite this code ? I want to use for loop . If my score will increase about 2 points my game will add extra bomb. I dont wnat to copy cody for every 2 points
if(this.score == 2){
this.bomb.create(Phaser.Math.RND.between(0, 3200), Phaser.Math.RND.between(0, 2200), 'bomba2');
} else if (this.score == 4){
this.bomb.create(Phaser.Math.RND.between(0, 3200), Phaser.Math.RND.between(0, 2200), 'bomba2');
} else if (this.score == 6){
this.bomb.create(Phaser.Math.RND.between(0, 3200), Phaser.Math.RND.between(0, 2200), 'bomba2');
}