Beispiel #1
0
        private void RunOneFrame()
        {
            if (!hasInitialized)
            {
                GameSubThread.Setup(this);
                GameSubThread.Instance.ScheduleWait(DoInitialize);
                gameTimer      = Stopwatch.StartNew();
                hasInitialized = true;
            }

            BeginRun();

            // FIXME: Not quite right..
            Tick();

            EndRun();
        }
Beispiel #2
0
        public void Run()
        {
            AssertNotDisposed();

            if (!hasInitialized)
            {
                GameSubThread.Setup(this);
                GameSubThread.Instance.ScheduleWait(DoInitialize);
                hasInitialized = true;
            }

            BeginRun();
            gameTimer = Stopwatch.StartNew();

            FNAPlatform.RunLoop(this);

            GameSubThread.Abort();

            EndRun();

            OnExiting(this, EventArgs.Empty);
        }
Beispiel #3
0
 internal static void Setup(Game game)
 {
     Instance = new GameSubThread(game);
     Instance.thread.Start();
 }