private void UpdateReallyLoopRendering() { var newValue = !IsInDesignMode && IsLoopRendering && Renderer != null && surface != null && VisualParent != null && IsVisible; newValue = false; if (newValue != isReallyLoopRendering) { isReallyLoopRendering = newValue; if (isReallyLoopRendering) { renderTimer.Resume(); renderTimer.Tick(); lastFpsUpdate = renderTimer.TotalTime; fpsFrameCounter = 0; CompositionTarget.Rendering += OnLoopRendering; } else { CompositionTarget.Rendering -= OnLoopRendering; renderTimer.Pause(); } } }
public void Pause(bool pause) { m_Pause = pause; if (m_Pause) { m_Timer.Pause(); } else { m_Timer.Resume(); } }
public override void Pause(bool pause) { base.Pause(pause); m_Shot.Pause(m_Pause); if (m_Pause) { m_ShotTimer.Pause(); m_VectorTimer.Pause(); } else { m_ShotTimer.Resume(); m_VectorTimer.Resume(); } }