diff options
author | Jakob Stendahl <jakobste@uio.no> | 2020-11-11 20:46:46 +0100 |
---|---|---|
committer | Jakob Stendahl <jakobste@uio.no> | 2020-11-11 20:46:46 +0100 |
commit | 773e9d4a49001fb35da1df98f6bdfe964aa08f3b (patch) | |
tree | 0bd879b2dc5d4bfd7c05e8aa7d863bb724e99f9e /td/Assets/Scripts | |
parent | a0795799b6746b041ab7e35a58feac0cd403464a (diff) | |
download | TD-773e9d4a49001fb35da1df98f6bdfe964aa08f3b.tar.gz TD-773e9d4a49001fb35da1df98f6bdfe964aa08f3b.zip |
Diffstat (limited to 'td/Assets/Scripts')
-rw-r--r-- | td/Assets/Scripts/cameraHandler.cs | 8 | ||||
-rw-r--r-- | td/Assets/Scripts/mainGUI.cs | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/td/Assets/Scripts/cameraHandler.cs b/td/Assets/Scripts/cameraHandler.cs index 7c2f75f..a3b447d 100644 --- a/td/Assets/Scripts/cameraHandler.cs +++ b/td/Assets/Scripts/cameraHandler.cs @@ -29,13 +29,13 @@ 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) { + // If there's an open menu, or the clicker is being pressed, ignore the touch. + if (Player.MainGui._sidebarExpanded) { return; } + /*if (GameManager.Instance.MenuManager.HasOpenMenu || GameManager.Instance.BitSpawnManager.IsSpawningBits) { return; }*/ - if (Input.touchSupported && Application.platform != RuntimePlatform.WebGLPlayer) { + if (Input.touchSupported && Application.platform != RuntimePlatform.WebGLPlayer) { HandleTouch(); } else { HandleMouse(); diff --git a/td/Assets/Scripts/mainGUI.cs b/td/Assets/Scripts/mainGUI.cs index 26ec78b..d5019ce 100644 --- a/td/Assets/Scripts/mainGUI.cs +++ b/td/Assets/Scripts/mainGUI.cs @@ -6,7 +6,8 @@ using UnityEngine; public class MainGui : MonoBehaviour { [Header("Scripting vars")] public Player Player; // Reference to the player object, should be set in designer - + + private GameObject _pnlMenu; private GameObject _pnlSidebar; private GameObject _pnlSettings; @@ -25,7 +26,7 @@ public class MainGui : MonoBehaviour { private Text _txtGoHighScore; private Text _txtGoNewHighScore; - private bool _sidebarExpanded; + public bool _sidebarExpanded; private readonly float[] _sidebarStates = new float[2] {0f, -202.4f}; // The x position of the sidebar expanded or collapsed private bool _menuActive; |