示例#1
0
        public static void run()
        {
            while (myShouldQuit == false)
            {
                if (onPreFrame != null)
                {
                    onPreFrame();
                }

                TimeSource.frameStep();
                myEventManager.tick(myMinTime, myMaxTime);
                myTaskManager.tick(myClock.timeThisFrame());

                if (onPostFrame != null)
                {
                    onPostFrame();
                }
            }

            if (onPreShutdown != null)
            {
                onPreShutdown();
            }

            //shutdown tasks
            myEventManager.shutdown();
            myTaskManager.shutdown();
        }
示例#2
0
        void renderTimerElapsed(object sender, EventArgs args)
        {
            //update the clock
            TimeSource.frameStep();

            //update the camera
            myCameraEventHandler.tick((float)TimeSource.timeThisFrame());

            glControl1.Invalidate();
        }
示例#3
0
 public static void tick()
 {
     TimeSource.frameStep();
     myEventManager.tick(myMinTime, myMaxTime);
     myTaskManager.tick(TimeSource.timeThisFrame());
 }