Exemplo n.º 1
0
        // todo: multiple SceneView
        private void HandleOnSceneGUI(SceneView view)
        {
            var curResolution = new Vector2(Screen.width, Screen.height);

            if (curResolution != previousSceneResolution)
            {
                OnResolutionChange?.Invoke(curResolution);
                previousSceneResolution = curResolution;
            }
            OnSceneGui?.Invoke();
            OnGui?.Invoke();
        }
Exemplo n.º 2
0
        //public void DelayedCall(float secsToDelay,  Action action) {
        //  this.Invoke()
        //}
        //============================================================
        private void OnGUI()
        {
            var curResolution = new Vector2(Screen.width, Screen.height);

            if (curResolution != previousGameResolution)
            {
                OnResolutionChange?.Invoke(curResolution);
                previousGameResolution = curResolution;
            }
            OnGameGui?.Invoke();
            OnGui?.Invoke();
        }
        private void OnGUI()
        {
            _backgroundGrid.Draw();

            OnGui?.Invoke();
            ProcessedEvents?.Invoke(Event.current);

            ProcessEvents(Event.current);

            if (GUI.changed)
            {
                Repaint();
            }
        }
        // ReSharper disable once InconsistentNaming
        private void OnGUI()
        {
            _backgroundGrid.Draw();

            // ReSharper disable once UseNullPropagation
            if (OnGui != null)
            {
                OnGui.Invoke();
            }

            // ReSharper disable once UseNullPropagation
            if (ProcessedEvents != null)
            {
                ProcessedEvents.Invoke(Event.current);
            }

            ProcessEvents(Event.current);

            if (GUI.changed)
            {
                Repaint();
            }
        }
Exemplo n.º 5
0
 private void OnGUI()
 {
     OnGui?.Invoke();
 }