コード例 #1
0
 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);
     // }
 }
コード例 #2
0
        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);
            // }
        }