Exemplo n.º 1
0
        public static void CheckForSwitchDisplayInput(GameObject theArea)
        {
            Event e = Event.current;

            if (EventType.KeyDown == e.type && KeyCode.R == e.keyCode)
            {
                if (e.modifiers == EventModifiers.Shift)
                {
                    SS_LevelCanvas theLevelCanvas = theArea.gameObject.GetComponentInParent <SS_LevelCanvas>();

                    if (theLevelCanvas == null)
                    {
                        theLevelCanvas = theArea.gameObject.GetComponent <SS_LevelCanvas>();
                    }

                    theLevelCanvas.SwitchLevelCanvasDebugDisplay();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Action that gets called from child elements to update the level canvas hierarchy
        /// </summary>
        public void SwitchCanvasDisplayMode()
        {
            SS_LevelCanvas theLevelCanvas = gameObject.GetComponentInParent <SS_LevelCanvas>();

            theLevelCanvas.SwitchLevelCanvasDebugDisplay();
        }