public virtual void Update() { // try // { InputSystem.Update(); mousePosition = InputManager.MousePosition; for (int i = 0; i < updatables.Length; i++) { IUpdatable updatable = updatables[i]; updatable.DoUpdate(); } Physics.Simulate(Time.deltaTime); ObjectPool.Instance.DoUpdate(); framesSinceLoadedScene++; previousMousePosition = mousePosition; // } // catch (Exception e) // { // print(e.Message + "\n" + e.StackTrace); // } }
void Update() { #if UNITY_EDITOR if (!Application.isPlaying) { return; } #endif if (!initialized) { return; } // try // { InputSystem.Update(); leftGameplayMenuInput = InputManager.LeftGameplayMenuInput; rightGameplayMenuInput = InputManager.RightGameplayMenuInput; gameplayMenuInput = InputManager.GameplayMenuInput; HandleGameplayMenu(); for (int i = 0; i < updatables.Length; i++) { IUpdatable updatable = updatables[i]; updatable.DoUpdate(); } Physics.Simulate(Time.deltaTime); ObjectPool.instance.DoUpdate(); // GameCamera.Instance.DoUpdate (); framesSinceLoadedScene++; previousMousePosition = InputManager.MousePosition; previousLeftGameplayMenuInput = leftGameplayMenuInput; previousRightGameplayMenuInput = rightGameplayMenuInput; previousGameplayMenuInput = gameplayMenuInput; // } // catch (Exception e) // { // Debug.Log(e.Message + "\n" + e.StackTrace); // } }