コード例 #1
0
 public void Start()
 {
     target = new System.Windows.Forms.Form();
     target.Show();
     target.Update();
     ready = true;
     StartInternal();
     PhysicsThread      = new Thread(new ThreadStart(PhysicsLoop));
     PhysicsThread.Name = "Physics thread";
     RenderThread.Start();
     PhysicsThread.Start();
     MainLoop();
 }
コード例 #2
0
 /// <summary>
 /// 允许绘制用户界面,一般表示文档更新完毕,可以绘制文档内容
 /// </summary>
 public void EndUpdate()
 {
     intUpdateLevel--;
     if (intUpdateLevel < 0)
     {
         intUpdateLevel = 0;
     }
     if (intUpdateLevel <= 0)
     {
         if (myBindControl != null)
         {
             myBindControl.Update();
         }
         if (Update != null)
         {
             Update(this, null);
         }
     }
 }
コード例 #3
0
ファイル: Application.cs プロジェクト: r-bel/glorg2
 public void StartAsync()
 {
     target = new System.Windows.Forms.Form();
     target.Show();
     target.Update();
     ready = true;
     StartInternal();
     LogicThread = new System.Threading.Thread(new System.Threading.ThreadStart(MainLoop));
     LogicThread.Name = "Logic thread";
     PhysicsThread = new Thread(new ThreadStart(PhysicsLoop));
     PhysicsThread.Name = "Physics thread";
     RenderThread.Start();
     LogicThread.Start();
     PhysicsThread.Start();
 }