Beispiel #1
0
        //[Test]
        public override void Test(ace.GraphicsType graphicsType)
        {
            var option = new ace.EngineOption
            {
                GraphicsType = graphicsType,
                IsFullScreen = false
            };

            var initialized = ace.Engine.Initialize("Empty", 640, 480, option);

            int time = 0;

            while (ace.Engine.DoEvents())
            {
                ace.Engine.Update();

                if (time == 10)
                {
                    break;
                }
                time++;
            }

            ace.Engine.Terminate();
        }
        //[Test]
        public override void Test(ace.GraphicsType graphicsType)
        {
            var option = new ace.EngineOption
            {
                GraphicsType = graphicsType,
                IsFullScreen = false
            };

            bool closed = false;

            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            form.FormClosed += (object sender, System.Windows.Forms.FormClosedEventArgs e) =>
            {
                closed = true;
            };
            form.Show();


            // aceを初期化する。
            ace.Engine.InitializeByExternalWindow(form.Handle, new IntPtr(), form.Size.Width, form.Size.Height, new ace.EngineOption());

            int time = 0;

            // aceが進行可能かチェックする。
            while (ace.Engine.DoEvents())
            {
                System.Windows.Forms.Application.DoEvents();
                if (closed)
                {
                    break;
                }

                // aceを更新する。
                ace.Engine.Update();

                if (time == 10)
                {
                    break;
                }
                time++;
            }

            // aceを終了する。
            ace.Engine.Terminate();
        }
 public abstract void Test(ace.GraphicsType graphicsType);