Skip to content

Documentation for "Screen Management" uses "Game.SpriteBatch" which does not exist (but should ;) #119

Description

@asciibeats

Just started with MonoGame(.Extended) btw. Thank you!

public class MainMenuScreen : GameScreen
{
  ...

  public override void Draw(GameTime gameTime)
  {
      GraphicsDevice.Clear(Color.CornflowerBlue);
      
      Game.SpriteBatch.Begin();
      Game.SpriteBatch.DrawString(_font, "Main Menu", _titlePosition, Color.White);
      Game.SpriteBatch.DrawString(_font, "Press Enter To Play", new Vector2(100, 100), Color.White);
      Game.SpriteBatch.End();
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions