예제 #1
0
        void PlatformStartGame()
        {
            if (timeSource != null)
            {
                timeSource.Invalidate();
            }

            timeSource = new GameViewTimeSource(this, 60.0f);

            CreateFrameBuffer();

            timeSource.Resume();
        }
예제 #2
0
        void PlatformDispose(bool disposing)
        {
            MakeCurrent();

            if (disposing)
            {
                if (timeSource != null)
                {
                    timeSource.Invalidate();
                    timeSource = null;
                }
            }

            if (backgroundObserver != null)
            {
                NSNotificationCenter.DefaultCenter.RemoveObserver(backgroundObserver);
            }

            if (foregroundObserver != null)
            {
                NSNotificationCenter.DefaultCenter.RemoveObserver(foregroundObserver);
            }
        }