private void Init() { if (m_keepAlive) { DontDestroyOnLoad(transform.root.gameObject); } m_fpsMonitor = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor; m_ramMonitor = GetComponentInChildren(typeof(G_RamMonitor), true) as G_RamMonitor; m_audioMonitor = GetComponentInChildren(typeof(G_AudioMonitor), true) as G_AudioMonitor; m_fpsManager = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager; m_ramManager = GetComponentInChildren(typeof(G_RamManager), true) as G_RamManager; m_audioManager = GetComponentInChildren(typeof(G_AudioManager), true) as G_AudioManager; m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_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); if (!m_enableOnStartup) { ToggleActive(); } m_initialized = true; }
public void SetModulePosition(ModuleType moduleType, ModulePosition modulePosition) { switch (moduleType) { case ModuleType.FPS: case ModuleType.RTT: m_graphModulePosition = modulePosition; m_fpsManager.SetPosition(modulePosition); m_rttManager.SetPosition(modulePosition); break; case ModuleType.ADVANCED: m_advancedData.SetPosition(modulePosition); break; } }
public void SetModulePosition(ModuleType moduleType, ModulePosition modulePosition) { switch (moduleType) { case ModuleType.FPS: case ModuleType.RAM: case ModuleType.RPM: case ModuleType.AUDIO: m_graphModulePosition = modulePosition; m_ramManager.SetPosition(modulePosition); m_rpmManager.SetPosition(modulePosition); m_fpsManager.SetPosition(modulePosition); m_audioManager.SetPosition(modulePosition); break; case ModuleType.ADVANCED: m_advancedData.SetPosition(modulePosition); break; } }
private void Init() { if (m_keepAlive) { DontDestroyOnLoad(transform.root.gameObject); } m_fpsMonitor = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor; m_rttMonitor = GetComponentInChildren(typeof(G_RttMonitor), true) as G_RttMonitor; m_fpsManager = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager; m_rttManager = GetComponentInChildren(typeof(G_RttManager), true) as G_RttManager; m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_AdvancedData; m_fpsManager.SetPosition(m_graphModulePosition); m_rttManager.SetPosition(m_graphModulePosition); m_advancedData.SetPosition(m_advancedModulePosition); m_fpsManager.SetState(m_fpsModuleState); m_rttManager.SetState(m_rttModuleState); m_advancedData.SetState(m_advancedModuleState); if (!m_enableOnStartup) { ToggleActive(); // We need to enable this on startup because we disable it in GraphyManagerEditor GetComponent <Canvas>().enabled = true; } // Set the Preset as the chosen Preset. // If the ModulePreset has changed we call set preset here to init with the correct selected state. SetPreset(m_modulePresetState); m_initialized = true; }
private void Init() { _player = ReInput.players.GetPlayer(m_rewiredPlayerName); if (m_keepAlive) { DontDestroyOnLoad(transform.root.gameObject); } m_fpsMonitor = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor; m_ramMonitor = GetComponentInChildren(typeof(G_RamMonitor), true) as G_RamMonitor; m_audioMonitor = GetComponentInChildren(typeof(G_AudioMonitor), true) as G_AudioMonitor; m_fpsManager = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager; m_ramManager = GetComponentInChildren(typeof(G_RamManager), true) as G_RamManager; m_audioManager = GetComponentInChildren(typeof(G_AudioManager), true) as G_AudioManager; m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_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); if (!m_enableOnStartup) { ToggleActive(); // We need to enable this on startup because we disable it in GraphyManagerEditor GetComponent <Canvas>().enabled = true; } m_initialized = true; }