From d77cd51742cb760f5f2e8f5f3c283e311ffffe1c Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Fri, 13 Oct 2017 22:11:33 +0200 Subject: Added new method for pausing the game --- td/Assets/Scripts/EnemySpawner.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'td/Assets/Scripts/EnemySpawner.cs') diff --git a/td/Assets/Scripts/EnemySpawner.cs b/td/Assets/Scripts/EnemySpawner.cs index 5b0249d..a1a6b1f 100644 --- a/td/Assets/Scripts/EnemySpawner.cs +++ b/td/Assets/Scripts/EnemySpawner.cs @@ -28,6 +28,7 @@ public class EnemySpawner : MonoBehaviour { } void Update () { + if (Player.GameIsPaused()) { return; } // This ensures that the game stays paused _n++; if (_n == _next) { -- cgit v1.2.3