コード例 #1
0
        public void Start()
        {
            RuntimeConfiguration rtc = Program.GetRuntime();

            Runtime.RGSSVersion             = rtc.GetRGSSVersion();
            Runtime.ResourcePaths           = rtc.GetResourcePaths();
            Runtime.DefaultResolutionWidth  = rtc.GetDefaultResolutionWidth();
            Runtime.DefaultResolutionHeight = rtc.GetDefaultResolutionHeight();
            Graphics.initialize(Program.Window);
            engine.Execute(Window.ruby_helper(), scope);
            engine.Execute(CTilemap.ruby_helper(), scope);
            engine.Execute(Viewport.ruby_helper(), scope);
            engine.Execute(Rect.ruby_helper(), scope);
            engine.Execute(Sprite.ruby_helper(), scope);
            engine.Execute(Color.ruby_helper(), scope);
            engine.Execute(Tone.ruby_helper(), scope);
            engine.Execute(Bitmap.ruby_helper(), scope);
            Font.load_fonts();
            engine.Execute(Font.ruby_helper(), scope);


            try
            {
                engine.Execute(@"rgss_start", scope);
            }
            catch (Exception e)
            {
                Program.Error(e.Message);
            }
        }
コード例 #2
0
        public void Start()
        {
            RuntimeConfiguration rtc = Program.GetRuntime();

            OpenGame.Runtime.Runtime.RGSSVersion             = rtc.GetRGSSVersion();
            OpenGame.Runtime.Runtime.ResourcePaths           = rtc.GetResourcePaths();
            OpenGame.Runtime.Runtime.DefaultResolutionWidth  = rtc.GetDefaultResolutionWidth();
            OpenGame.Runtime.Runtime.DefaultResolutionHeight = rtc.GetDefaultResolutionHeight();
            OG_Graphics.initialize(Program.Window);
            if (rtc.IsDebug() && rtc.IsPlayTest())
            {
                engine.Execute("$DEBUG = $TEST = true", scope);
            }
            engine.Execute(OG_Graphics.ruby_helper(), scope);
            engine.Execute(OG_Input.ruby_helper(), scope);
            engine.Execute(Plane.ruby_helper(), scope);
            engine.Execute(Table.ruby_helper(), scope);
            engine.Execute(Window.ruby_helper(), scope);
            engine.Execute(CTilemap.ruby_helper(), scope);
            engine.Execute(Viewport.ruby_helper(), scope);
            engine.Execute(Rect.ruby_helper(), scope);
            engine.Execute(Sprite.ruby_helper(), scope);
            engine.Execute(Color.ruby_helper(), scope);
            engine.Execute(Tone.ruby_helper(), scope);
            engine.Execute(Bitmap.ruby_helper(), scope);
            Font.load_fonts();
            engine.Execute(Font.ruby_helper(), scope);

            try
            {
                engine.Execute(@"$OPENGAME_EXE = true");
                engine.Execute("$RGSS_SCRIPTS_PATH = '" + rtc.GetScriptsPath() + "'");
                engine.Execute(@"rgss_start", scope);
            }
            catch (Exception e)
            {
                Program.Error(e.Message);
            }
        }