Ejemplo n.º 1
0
 protected override void OnIsRetainedChanged(bool isRetained)
 {
     FrameRateManager.Instance.StopRequest(this._request);
     if (!isRetained)
     {
         this._request = FrameRateRequest.Invalid;
         return;
     }
     this._request = FrameRateManager.Instance.StartRequest(this._type, this._rate);
 }
 private void AssertCurrentRequestRunning(bool running)
 {
     FrameRateManager.Instance.StopRequest(this._request);
     if (!running)
     {
         this._request = FrameRateRequest.Invalid;
         return;
     }
     this._request = FrameRateManager.Instance.StartRequest(this._type, this._rate);
 }
Ejemplo n.º 3
0
        protected virtual void OnLoopStarted()
        {
            this._frameRateRequest = FrameRateManager.Instance.StartRequest(FrameRateType.FPS, this.GetMinFrameRateToKeep());

            var evnt = this._loopStarted;

            if (evnt == null)
            {
                return;
            }
            evnt(this);
        }