From 87aea4bd6f5e9e05bc04d2ce24e547c62f72f848 Mon Sep 17 00:00:00 2001 From: Evert Date: Tue, 22 Aug 2017 12:08:12 +0300 Subject: [PATCH] don't tick towers in play/game over state --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ba8b5f2..3e92efc 100644 --- a/index.js +++ b/index.js @@ -603,7 +603,11 @@ window.onload = function () { fpsDraw = fps } - tickTowers() + // Only tick towers when the game is in the play state + if (Game.state === 1) { + tickTowers() + } + updateEnemyMovements() tickParticles() tickSellText()