private void ToggleModule(GraphyManager.ModuleType module)
        {
            GraphyManager.ModuleState state = GraphyManager.ModuleState.OFF;

            switch (module)
            {
            case GraphyManager.ModuleType.FPS:
                state = _graphyManager.FpsModuleState;
                break;

            case GraphyManager.ModuleType.RAM:
                state = _graphyManager.RamModuleState;
                break;

            case GraphyManager.ModuleType.AUDIO:
                state = _graphyManager.AudioModuleState;
                break;

            case GraphyManager.ModuleType.ADVANCED:
                state = _graphyManager.AdvancedModuleState;
                break;
            }

            _graphyManager.SetModuleMode(module, state == GraphyManager.ModuleState.OFF ? GraphyManager.ModuleState.FULL : GraphyManager.ModuleState.OFF);
        }
Exemplo n.º 2
0
        public void SetState(GraphyManager.ModuleState state, bool silentUpdate = false)
        {
            if (!silentUpdate)
            {
                m_previousModuleState = m_currentModuleState;
            }

            m_currentModuleState = state;

            switch (state)
            {
            case GraphyManager.ModuleState.FULL:
                gameObject.SetActive(true);
                m_childrenGameObjects.SetAllActive(true);
                SetGraphActive(true);

                if (m_graphyManager.Background)
                {
                    m_backgroundImages.SetOneActive(0);
                }
                else
                {
                    m_backgroundImages.SetAllActive(false);
                }

                break;

            case GraphyManager.ModuleState.TEXT:
            case GraphyManager.ModuleState.BASIC:
                gameObject.SetActive(true);
                m_childrenGameObjects.SetAllActive(true);
                SetGraphActive(false);

                if (m_graphyManager.Background)
                {
                    m_backgroundImages.SetOneActive(1);
                }
                else
                {
                    m_backgroundImages.SetAllActive(false);
                }

                break;

            case GraphyManager.ModuleState.BACKGROUND:
                gameObject.SetActive(true);
                SetGraphActive(false);

                m_childrenGameObjects.SetAllActive(false);
                m_backgroundImages.SetAllActive(false);

                break;

            case GraphyManager.ModuleState.OFF:
                gameObject.SetActive(false);
                break;
            }
        }
Exemplo n.º 3
0
        public void SetState(GraphyManager.ModuleState state)
        {
            m_previousModuleState = m_currentModuleState;
            m_currentModuleState  = state;

            bool active = state == GraphyManager.ModuleState.FULL ||
                          state == GraphyManager.ModuleState.TEXT ||
                          state == GraphyManager.ModuleState.BASIC;

            gameObject.SetActive(active);

            m_backgroundImages.SetAllActive(active && m_graphyManager.Background);
        }