private void RunOneFrame() { if (!hasInitialized) { GameSubThread.Setup(this); GameSubThread.Instance.ScheduleWait(DoInitialize); gameTimer = Stopwatch.StartNew(); hasInitialized = true; } BeginRun(); // FIXME: Not quite right.. Tick(); EndRun(); }
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); }
internal static void Setup(Game game) { Instance = new GameSubThread(game); Instance.thread.Start(); }