コード例 #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);
 }