private void ToggleWindow(bool isOpen) { if (isOpen == IsOpen) { return; } m_bIsOpen = isOpen; try { if (null != m_UIAssetBundle) { LoadVortexOverlay(isOpen); } } catch (Exception e) { // We didn't manage to load the Overlay. // That's fine, keep going. LoggerDelegates.LogInfo(e); } if (isOpen) { // Keep track of the initial cursor settings. m_CursorStatus.IsCursorActive = Cursor.visible; m_CursorStatus.LockState = Cursor.lockState; // Stop time and ensure that the cursor is enabled. Time.timeScale = 0f; Cursor.visible = true; Cursor.lockState = CursorLockMode.None; } else { // Re-instate the original cursort settings and resume time. Time.timeScale = 1f; Cursor.visible = m_CursorStatus.IsCursorActive; Cursor.lockState = m_CursorStatus.LockState; } }
public void Log(string str) { LoggerDelegates.LogInfo(m_modId + str); }