Commit 4e59794f authored by Pablo R. Mier's avatar Pablo R. Mier

disable shot when invaders == min

parent 2c194807
......@@ -64,7 +64,7 @@ invadersApp.Player.prototype.update = function () {
// Get the number of alive invaders
var aliveInvaders = this.ctx.objects.invaders.countLiving();
if (aliveBullets <= aliveInvaders/10) {
if (aliveInvaders > MIN_INVADERS && aliveBullets <= aliveInvaders/10) {
this.lastShootAt = this.game.time.now;
var bullet = this.bullets.getFirstExists(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment