Setup for GumBatch (Optional)
Introduction
GumBatch Quick Start
public class Game1 : Game
{
private GraphicsDeviceManager _graphics;
RenderingLibrary.Graphics.BitmapFont font;
GumBatch gumBatch;
public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
protected override void Initialize()
{
MonoGameGum.GumService.Default.Initialize(this);
gumBatch = new GumBatch();
font = new RenderingLibrary.Graphics.BitmapFont(
"Fonts/Font18Caladea.fnt",
SystemManagers.Default);
base.Initialize();
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
gumBatch.Begin();
gumBatch.DrawString(
font,
"This is using Gum Batch",
new Vector2(0, 150),
Color.White);
gumBatch.End();
base.Draw(gameTime);
}
}


Last updated
Was this helpful?

