예제 #1
0
        private static void startWorker(GraphicsWorker worker)
        {
            Thread workerThread = new Thread((ThreadStart) delegate { runWorker(worker); });

            StreamGraphics.Insance.workerThreads.Add(workerThread);
            workerThread.Start();
        }
예제 #2
0
 private static void runWorker(GraphicsWorker worker)
 {
     try
     {
         worker.run();
     }
     catch (ThreadInterruptedException)
     {
         return;
     }
 }
예제 #3
0
 public GameScreen()
 {
     _graphicsWorker = new GraphicsWorker(0, this);
     AddWorker(new PhysicsWorker(new GameTime(), 60));
 }
예제 #4
0
 public static void registerWorker(GraphicsWorker worker)
 {
     startWorker(worker);
     StreamGraphics.Insance.workers.Add(worker);
 }