コード例 #1
0
        public static void LetsGo()
        {
            #region Install Error Manager, and the global engine!
            NALACore.Core.Window.Title = SBubble.Title;
            #endregion


            #region The base MonoGame stuff
            SBubble.AddInit(delegate(string v) { SBubble.State(v).DoString($"function {FlowManager.NOTHING}() end", "Alright move along, nothing to see here!"); });
            SBubble.AddInit(BubbleConsole.StateInit);
            SBubble.AddInit(BubbleGraphics.InitGraphics);
            SBubble.AddInit(Bubble_Audio.Init);
            SBubble.AddInit(APIFlow.Init);
            SBubble.AddInit(BubbleSuperGlobal.Init);
            SBubble.AddInit(Bubble_Input.Init);
            SBubble.AddInit(Bubble_Save.Init);
            SBubble.AddInit(Bubble_Conf.Init);
            SBubble.AddInit(Bubble_GameJolt.Init);
            SBubble.AddInit(BubbleTimer.Init);
            SBubble.AddInit(Bubble_Swap.Init);
            #endregion

            #region Extras to use in savegames
            Bubble_Save.SaveXtra["RPGPARTY"] = delegate(UseJCR6.TJCRCreate j, string dir) {
                RPG.RPGSave(j, $"XTRA/{dir}");
            };
            Bubble_Save.LoadXtra["RPGPARTY"] = delegate(UseJCR6.TJCRDIR j, string dir) {
                RPG.RPGLoad(j, $"XTRA/{dir}");
                return(true);
            };
            Bubble_Save.SaveXtra["SWAP"] = Bubble_Swap.SwapSave;
            Bubble_Save.LoadXtra["SWAP"] = Bubble_Swap.SwapLoad;
            #endregion

            #region The stuff needed for NALA in particular
            // Own APIs for NIL and Lua
            //SBubble.AddInit(MapScriptAPI.API_Init);
            SBubble.AddInit(RPG_API.Init);

            // Kthura Init
            Kthura.SetDefaultTextureJCR(SBubble.JCR);                   // Textures are all in the same project
            KthuraDraw.DrawDriver           = new KthuraDrawMonoGame(); // Tell Kthura to use the MonoGame Driver to display the map
            KthuraDrawMonoGame.CrashOnNoTex = delegate(string msg) { SBubble.MyError("Kthura Texture Error", msg, ""); };

            // SBubble Kthura API
            SBubble.AddInit(KthuraBubble.KthuraBubble.Init);
            SBubble.AddInit(KthuraBubble.KthBlockAPI.Init);
            SBubble.AddInit(KthuraBubble.KthuraAbyssGenerator.Init);

            // TODO: API for TeddyBear
            // TODO: API for Swap Data Manager
            // TODO: API for RPGStat
            RPG.JCRSTORAGE = "lzma";
            #endregion

            // Start init script
            FlowManager.StartInitFlow();
        }
コード例 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            // TQMG
            TQMG.Init(graphics, GraphicsDevice, spriteBatch, SBubble.JCR);

            // Make sure all states consider at least these!
            SBubble.AddInit(delegate(string v) { SBubble.State(v).DoString($"function {FlowManager.NOTHING}() end", "Alright move along, nothing to see here!"); });
            SBubble.AddInit(BubbleConsole.StateInit);
            SBubble.AddInit(BubbleGraphics.InitGraphics);
            SBubble.AddInit(Bubble_Audio.Init);
            SBubble.AddInit(APIFlow.Init);
            SBubble.AddInit(BubbleSuperGlobal.Init);
            SBubble.AddInit(Bubble_Input.Init);
            SBubble.AddInit(Bubble_Save.Init);

            // Start init script
            FlowManager.StartInitFlow();


            // Error Test
            //Error.GoError("Test", "TestError", "Traceme");
        }