//メインループ static private void MainLoop() { while (DX.ScreenFlip() == 0 && DX.ProcessMessage() == 0 && DX.ClearDrawScreen() == 0) { //シーンのUpdate mainScene.LoopDo(); //透明度リセット DX.SetDrawBlendMode(DX.DX_BLENDMODE_ALPHA, 255); FpsControl.Fps(); FpsControl.FpsShow(); //キー判定の更新 KeyControl.UpdateKey(); } }
//メインループ static private void MainLoop(Form mainForm) { while (mainForm.Created && DX.ProcessMessage() == 0) { DX.ClearDrawScreen(); FpsControl.Fps(); subSceneList.Lock(); subSceneList.GetList.ForEach( (scene) => { DX.ClearDrawScreen(); DX.SetScreenFlipTargetWindow(scene.control.Handle); scene.LoopDo(); FpsControl.FpsShow(); DX.SetDrawScreen(DX.DX_SCREEN_BACK); DX.ScreenFlip(); } ); subSceneList.UnLock(); DX.SetDrawBlendMode(DX.DX_BLENDMODE_ALPHA, 255); KeyControl.UpdateKey(); Application.DoEvents(); } }