private void Init() { if (m_keepAlive) { DontDestroyOnLoad(transform.root.gameObject); } m_fpsMonitor = GetComponentInChildren(typeof(FpsMonitor), true) as FpsMonitor; m_ramMonitor = GetComponentInChildren(typeof(RamMonitor), true) as RamMonitor; m_audioMonitor = GetComponentInChildren(typeof(AudioMonitor), true) as AudioMonitor; m_fpsManager = GetComponentInChildren(typeof(FpsManager), true) as FpsManager; m_ramManager = GetComponentInChildren(typeof(RamManager), true) as RamManager; m_audioManager = GetComponentInChildren(typeof(AudioManager), true) as AudioManager; m_advancedData = GetComponentInChildren(typeof(AdvancedData), true) as AdvancedData; m_fpsManager.SetPosition(m_graphModulePosition); m_ramManager.SetPosition(m_graphModulePosition); m_audioManager.SetPosition(m_graphModulePosition); m_advancedData.SetPosition(m_advancedModulePosition); m_fpsManager.SetState(m_fpsModuleState); m_ramManager.SetState(m_ramModuleState); m_audioManager.SetState(m_audioModuleState); m_advancedData.SetState(m_advancedModuleState); }
public void SetModuleMode(ModuleType moduleType, ModuleState moduleState) { switch (moduleType) { case ModuleType.FPS: m_fpsManager.SetState(moduleState); break; case ModuleType.RAM: m_ramManager.SetState(moduleState); break; case ModuleType.AUDIO: m_audioManager.SetState(moduleState); break; case ModuleType.ADVANCED: m_advancedData.SetState(moduleState); break; } }