diff options
author | Jakob Stendahl <jakob.stendahl@outlook.com> | 2017-10-13 22:11:33 +0200 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2017-10-13 22:11:33 +0200 |
commit | d77cd51742cb760f5f2e8f5f3c283e311ffffe1c (patch) | |
tree | a60aaccbbe51c2202e596c22d3741370fdc357d2 /td/Assets/Scripts/cameraHandler.cs | |
parent | 112a91b7084a5365291c712fabcb8ceeb4c644ce (diff) | |
download | TD-d77cd51742cb760f5f2e8f5f3c283e311ffffe1c.tar.gz TD-d77cd51742cb760f5f2e8f5f3c283e311ffffe1c.zip |
Added new method for pausing the game
Diffstat (limited to 'td/Assets/Scripts/cameraHandler.cs')
-rw-r--r-- | td/Assets/Scripts/cameraHandler.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/td/Assets/Scripts/cameraHandler.cs b/td/Assets/Scripts/cameraHandler.cs index 1655509..7c2f75f 100644 --- a/td/Assets/Scripts/cameraHandler.cs +++ b/td/Assets/Scripts/cameraHandler.cs @@ -11,6 +11,8 @@ public class CameraHandler : MonoBehaviour { public static readonly float[] BoundsY = new float[]{-5f, 10f}; public static readonly float[] BoundsZ = new float[]{-8f, 8f}; public static readonly float[] ZoomBounds = new float[]{1f, 5f}; + [Header("Scripting vars")] + public Player Player; // Reference to the player object, should be set in designer private Camera _cam; @@ -26,6 +28,7 @@ public class CameraHandler : MonoBehaviour { } void Update() { + if (Player.GameIsPaused()) { return; } // If there's an open menu, or the clicker is being pressed, ignore the touch. /* if (GameManager.Instance.MenuManager.HasOpenMenu || GameManager.Instance.BitSpawnManager.IsSpawningBits) { |