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 SetModulePosition(ModuleType moduleType, ModulePosition modulePosition) { switch (moduleType) { case ModuleType.FPS: case ModuleType.RAM: case ModuleType.AUDIO: m_graphModulePosition = modulePosition; m_ramManager.SetPosition(modulePosition); m_fpsManager.SetPosition(modulePosition); m_audioManager.SetPosition(modulePosition); break; case ModuleType.ADVANCED: m_advancedData.SetPosition(modulePosition); break; } }