public override void render(Graphics graphics, Camera camera) { IMGUI.beginWindow((Screen.width / 2) - 100, (Screen.height / 2) - 90, 200, 180); if (IMGUI.button("BT: LowerPriority Abort Tree")) { Debug.log("------ Enabled Behavior Tree LowerPriority Abort ------"); disableAllAI(); _miner.buildLowerPriorityAbortTree(); _miner.setEnabled(true); } if (IMGUI.button("BT: Self Abort Tree")) { Debug.log("------ Enabled Behavior Tree Self Abort ------"); disableAllAI(); _miner.buildSelfAbortTree(); _miner.setEnabled(true); } if (IMGUI.button("Utility AI")) { Debug.log("------ Enabled Utility AI ------"); disableAllAI(); _utilityMiner.setEnabled(true); } if (IMGUI.button("GOAP")) { Debug.log("------ Enabled GOAP ------"); disableAllAI(); _goapMiner.setEnabled(true); } IMGUI.space(20); if (IMGUI.button("Stop AI")) { disableAllAI(); } IMGUI.endWindow(); }
protected override void Draw(GameTime gameTime) { base.Draw(gameTime); if (!_renderIMGUI) { return; } IMGUI.beginWindow(GraphicsDevice.Viewport.Width - 150, 0, 150, Screen.height); debugRenderEnabled = IMGUI.toggle("Debug Render", debugRenderEnabled); if (IMGUI.button("Destructable Map")) { scene = new DestructableMapScene(); } if (IMGUI.button("Scene 1 ShowAll")) { scene = Scenes.sceneOne(true); } if (IMGUI.button("Scene 1 NoBorder")) { scene = Scenes.sceneOne(false); } if (IMGUI.button("Scene 1 Pixel Bloom")) { Core.startSceneTransition(new SquaresTransition(() => Scenes.sceneOneBloom())); } if (IMGUI.button("Zelda Tilemap")) { Core.startSceneTransition(new WindTransition(() => Scenes.zeldaTilemap())); } if (IMGUI.button("Scene 2")) { var maskTexture = Core.contentManager.Load <Texture2D>("Images/bowser-mask"); Core.startSceneTransition(new ImageMaskTransition(() => Scenes.sceneTwo(), maskTexture)); } if (IMGUI.button("Scene 3 Box")) { Core.startSceneTransition(new TransformTransition(() => Scenes.sceneThree(true), TransformTransition.TransformTransitionType.SlideDown)); } if (IMGUI.button("Scene 3 Circle")) { Core.startSceneTransition(new TransformTransition(() => Scenes.sceneThree(false))); } if (IMGUI.button("Lights")) { Core.startSceneTransition(new TransformTransition(() => Scenes.lightsScene())); } if (IMGUI.button("Scene 4")) { Core.startSceneTransition(new FadeTransition(() => Scenes.sceneFour())); } if (IMGUI.button("Scene 5")) { Core.startSceneTransition(new CrossFadeTransition(() => Scenes.sceneFive())); } if (IMGUI.button("Overlap2D Scene")) { Core.startSceneTransition(new WindTransition(() => Scenes.sceneOverlap2D())); } if (IMGUI.button("Processor Scene")) { scene = Scenes.processorScene(); } if (IMGUI.button("Transform Scene")) { scene = Scene.createWithDefaultRenderer <TransformScene>(); } if (IMGUI.button("Rigidbody Scene")) { scene = Scene.createWithDefaultRenderer <RigidbodyScene>(); } if (IMGUI.button("SpringGrid Scene")) { scene = Scene.createWithDefaultRenderer <SpringGridScene>(); } if (IMGUI.button("Stencil Test Scene")) { scene = Scene.createWithDefaultRenderer <StencilTestScene>(); } IMGUI.space(15); if (IMGUI.button("Grab Screenshot")) { scene.requestScreenshot(tex => { var path = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "screenshot.png"); using (var stream = new System.IO.FileStream(path, System.IO.FileMode.OpenOrCreate)) tex.SaveAsPng(stream, tex.Width, tex.Height); tex.Dispose(); }); } IMGUI.endWindow(); }