public void Run() { // 初期設定を行う。 var option = new asd.EngineOption { 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を初期化する。 asd.Engine.InitializeByExternalWindow(form.Handle, IntPtr.Zero, form.Size.Width, form.Size.Height, option); // aceが進行可能かチェックする。 while (asd.Engine.DoEvents()) { System.Windows.Forms.Application.DoEvents(); if (closed) break; // aceを更新する。 asd.Engine.Update(); } // aceを終了する。 asd.Engine.Terminate(); }
public static void MainProgram() { var options = new asd.EngineOption() { IsWindowResizable = true, }; if (!asd.Engine.Initialize("FilePackageGenerator", 480, 640, options)) { return; } asd.Engine.OpenTool(); TryLoadFont( @"C:\Windows\Fonts\meiryo.ttc", @"/Library/Fonts/ヒラギノ丸ゴ Pro W4.otf", @"/Library/Fonts/ヒラギノ丸ゴ ProN W4.ttc", @"/System/Library/Fonts/ヒラギノ丸ゴ ProN W4.ttc" ); asd.Engine.ChangeScene(new ToolScene()); while (asd.Engine.DoEvents()) { asd.Engine.Update(); } asd.Engine.CloseTool(); asd.Engine.Terminate(); }
static void Main(string[] args) { // Altseedを初期化する。 var option = new asd.EngineOption { IsFullScreen = true }; int DispX = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; int DispY = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; asd.Engine.Initialize("Game", DispX, DispY, option); //asd.Engine.Initialize("Game", 1980, 1080, new asd.EngineOption()); // シーンを遷移する asd.Engine.ChangeSceneWithTransition(new TitleScene(), new asd.TransitionFade(0, 1.0f)); // Altseedのウインドウが閉じられていないか確認する。 while (asd.Engine.DoEvents()) { // もし、Escキーが押されていたらwhileループを抜ける・ if (asd.Engine.Keyboard.GetKeyState(asd.Keys.Escape) == asd.ButtonState.Push) { break; } // Altseedを更新する。 asd.Engine.Update(); } // Altseedの終了処理をする。 asd.Engine.Terminate(); }
static void Main(string[] args) { // ウィンドウサイズ可変,リソース再読み込み有効 asd.EngineOption engineOption = new asd.EngineOption { IsWindowResizable = true, IsReloadingEnabled = true }; // Altseedを初期化する。 asd.Engine.Initialize("GyokaiShooter", 640, 480, engineOption); var title = new Scenes.Title(); asd.Engine.ChangeScene(title); // Altseedが進行可能かチェックする。 while (asd.Engine.DoEvents()) { // Altseedを更新する。 asd.Engine.Update(); } // Altseedを終了する。 asd.Engine.Terminate(); }
//[Test] public override void Test(asd.GraphicsDeviceType graphicsType) { var option = new asd.EngineOption { GraphicsDevice = graphicsType, IsFullScreen = false }; var initialized = asd.Engine.Initialize("Empty", 640, 480, option); int time = 0; while (asd.Engine.DoEvents()) { asd.Engine.Update(); if (time == 10) { break; } time++; } asd.Engine.Terminate(); }
static void Main(string[] args) { // Altseed Initialization var engineOption = new asd.EngineOption { AutoGeneratedLayer = asd.AutoGeneratedLayerType.Nothing, IsWindowResizable = true, }; asd.Engine.Initialize("WIWS Test", 800, 600, engineOption); // Create Window Container var style = new Style(); var scene = new asd.Scene(); var wc = new WindowContainer(style); scene.AddLayer(wc); // Add Windows var window = wc.AddNewWindow("Test", new asd.RectI(100, 100, 400, 300)); wc.AddNewWindow("Test2", new asd.RectI(300, 200, 400, 300)); // Add Controls var label = new Label(); label.Text = "0"; window.AddControl(label); var button = new Button(); button.Text = "Button"; button.Clicked += () => { label.Text = (int.Parse(label.Text) + 1).ToString(); }; window.AddControl(button); var label2 = new Label(); label2.Text = "Test2"; window.AddControl(label2); asd.Engine.ChangeScene(scene); // Altseed Main Loop while (asd.Engine.DoEvents()) { asd.Engine.Update(); } // Altseed Termination asd.Engine.Terminate(); }
//[Test] public override void Test(asd.GraphicsDeviceType graphicsType) { var option = new asd.EngineOption { GraphicsDevice = 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を初期化する。 asd.Engine.InitializeByExternalWindow(form.Handle, new IntPtr(), form.Size.Width, form.Size.Height, new asd.EngineOption()); int time = 0; // aceが進行可能かチェックする。 while (asd.Engine.DoEvents()) { System.Windows.Forms.Application.DoEvents(); if (closed) { break; } // aceを更新する。 asd.Engine.Update(); if (time == 10) { break; } time++; } // aceを終了する。 asd.Engine.Terminate(); }
public void Run() { // 初期設定を行う。 var option = new asd.EngineOption { IsFullScreen = false }; asd.Engine.Initialize("Log", 100, 100, option); // Engineに格納されたものを使う(Log.htmlに出力される) var logger = asd.Engine.Logger; logger.Write("文字列"); logger.WriteLine("文字列+改行"); logger.WriteLine("<文字列>"); logger.WriteHeading("ヘッダ"); logger.WriteLineStrongly("強調文字列"); // 水平線(<hr/>) logger.WriteHorizontalRule(); // 表組み logger.BeginTable(); logger.Write("セル1"); logger.ChangeColumn(); logger.Write("セル2(ChangeColumn)"); logger.ChangeRow(); logger.Write("セル3(ChangeRow)"); logger.EndTable(); // SetOutputLevelメソッドで指定したものより低いレベルに指定した出力は、実行されない logger.OutputLevel = asd.LogLevel.Critical; logger.WriteLine("出力されるログ(critical)", asd.LogLevel.Critical); logger.WriteLine("出力されないログ(information)", asd.LogLevel.Information); logger.BeginTable(asd.LogLevel.Warning); logger.Write("出力されないテーブル", asd.LogLevel.Warning); logger.EndTable(asd.LogLevel.Warning); Console.WriteLine("Log.html に出力しました"); asd.Engine.Terminate(); }
public void Run() { // 初期設定を行う。 var option = new asd.EngineOption { IsFullScreen = false }; asd.Engine.Initialize( "Log", 100, 100, option); // Engineに格納されたものを使う(Log.htmlに出力される) var logger = asd.Engine.Logger; logger.Write( "文字列" ); logger.WriteLine( "文字列+改行" ); logger.WriteLine( "<文字列>" ); logger.WriteHeading( "ヘッダ" ); logger.WriteLineStrongly( "強調文字列" ); // 水平線(<hr/>) logger.WriteHorizontalRule(); // 表組み logger.BeginTable(); logger.Write( "セル1" ); logger.ChangeColumn(); logger.Write( "セル2(ChangeColumn)" ); logger.ChangeRow(); logger.Write( "セル3(ChangeRow)" ); logger.EndTable(); // SetOutputLevelメソッドで指定したものより低いレベルに指定した出力は、実行されない logger.OutputLevel = asd.LogLevel.Critical; logger.WriteLine( "出力されるログ(critical)", asd.LogLevel.Critical ); logger.WriteLine( "出力されないログ(information)", asd.LogLevel.Information ); logger.BeginTable( asd.LogLevel.Warning ); logger.Write( "出力されないテーブル", asd.LogLevel.Warning ); logger.EndTable( asd.LogLevel.Warning ); Console.WriteLine( "Log.html に出力しました" ); asd.Engine.Terminate(); }
static void Main(string[] args) { /* * Application application = new Application(); * application.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(application_DispatcherUnhandledException); * * var window = new MainWindow(); * window.Show(); * * application.Run(); */ //System.Windows.Forms.Application.Run(new Window()); var options = new asd.EngineOption(); options.IsWindowResizable = true; asd.Engine.Initialize("ImagePackageGenerator", 960, 540, options); asd.Engine.OpenTool(); // Font TryLoadFont( new[] { "C:\\Windows\\Fonts\\meiryo.ttc", "/Library/Fonts/ヒラギノ丸ゴ Pro W4.otf", "/Library/Fonts/ヒラギノ丸ゴ ProN W4.ttc", "/System/Library/Fonts/ヒラギノ丸ゴ ProN W4.ttc", } ); var scene = new ToolScene(); asd.Engine.ChangeScene(scene); while (asd.Engine.DoEvents()) { asd.Engine.Update(); } asd.Engine.Terminate(); }
static void Main(string[] args) { var result = System.Windows.Forms.MessageBox.Show("フルスクリーンで起動しますか?", Config.Window.Title, System.Windows.Forms.MessageBoxButtons.YesNo); var option = new asd.EngineOption { IsFullScreen = result == System.Windows.Forms.DialogResult.Yes }; asd.Engine.Initialize(Config.Window.Title, Config.Window.Width, Config.Window.Height, option); asd.Engine.File.AddRootDirectory("Resources/"); asd.Engine.ChangeSceneWithTransition(new Scenes.GameScene(), new asd.TransitionFade(1.0f, 1.0f)); while (asd.Engine.DoEvents()) { asd.Engine.Update(); } asd.Engine.Terminate(); }
public void Run() { // 初期設定を行う。 var option = new asd.EngineOption { IsFullScreen = false }; // aceを初期化する。 asd.Engine.Initialize("Empty", 640, 480, option); // aceが進行可能かチェックする。 while (asd.Engine.DoEvents()) { // aceを更新する。 asd.Engine.Update(); } // aceを終了する。 asd.Engine.Terminate(); }
//[Test] public override void Test(asd.GraphicsDeviceType graphicsType) { var option = new asd.EngineOption { GraphicsDevice = graphicsType, IsFullScreen = false }; var initialized = asd.Engine.Initialize("Empty", 640, 480, option); int time = 0; while (asd.Engine.DoEvents()) { asd.Engine.Update(); if (time == 10) break; time++; } asd.Engine.Terminate(); }
static void Main(string[] args) { var option = new asd.EngineOption() { IsReloadingEnabled = true }; asd.Engine.Initialize("フォント生成ツール", 400, 640, option); asd.Engine.OpenTool(); var tool = new ToolRenderer(); while (asd.Engine.DoEvents()) { // must to run before Engine.Update (TODO fix it or throw exception) tool.Render(); asd.Engine.Update(); } asd.Engine.CloseTool(); asd.Engine.Terminate(); }
public void Run() { // フルスクリーンで起動するように初期化オプションを生成する。 var option = new asd.EngineOption(); option.IsFullScreen = true; // 作成した初期化オプションを用いてAltseedを初期化する。 asd.Engine.Initialize("Empty", 640, 480, option); // 操作説明文を文字列オブジェクトとして作成。CreateDynamicFontで作成したフォントオブジェクトを用いる var font = asd.Engine.Graphics.CreateDynamicFont("", 20, new asd.Color(255, 255, 255), 2, new asd.Color(0, 0, 0)); var obj = new asd.TextObject2D(); obj.Font = font; obj.Text = "Escキーで終了"; // 操作説明文のオブジェクトをエンジンに登録する。 asd.Engine.AddObject2D(obj); // Altseedのウインドウが閉じられていないか確認する。 while (asd.Engine.DoEvents()) { // Altseedを更新する。 asd.Engine.Update(); // Escキーが押されていたら if (asd.Engine.Keyboard.GetKeyState(asd.Keys.Escape) == asd.ButtonState.Push) { // ゲームループを抜ける break; } Recorder.TakeScreenShot("Basic_FullScreen", 20); } // Altseedの終了処理をする。 asd.Engine.Terminate(); }
//[Test] public override void Test(asd.GraphicsDeviceType graphicsType) { var option = new asd.EngineOption { GraphicsDevice = 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を初期化する。 asd.Engine.InitializeByExternalWindow(form.Handle, new IntPtr(), form.Size.Width, form.Size.Height, new asd.EngineOption()); int time = 0; // aceが進行可能かチェックする。 while (asd.Engine.DoEvents()) { System.Windows.Forms.Application.DoEvents(); if (closed) break; // aceを更新する。 asd.Engine.Update(); if (time == 10) break; time++; } // aceを終了する。 asd.Engine.Terminate(); }
public void Run() { // 初期設定を行う。 var option = new asd.EngineOption { 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を初期化する。 asd.Engine.InitializeByExternalWindow(form.Handle, IntPtr.Zero, form.Size.Width, form.Size.Height, option); // aceが進行可能かチェックする。 while (asd.Engine.DoEvents()) { System.Windows.Forms.Application.DoEvents(); if (closed) { break; } // aceを更新する。 asd.Engine.Update(); } // aceを終了する。 asd.Engine.Terminate(); }