ScreenManager helps you to split your game into multiple
GameScreens with their own
Draw(GameTime gameTime) methods.
GameScreen classes are available in the
MonoGame.Extended is distributed via a NuGet package. You can add the NuGet package to your C# project through your IDE of choice (Visual Studio, Xamarin Studio, Rider, etc) or through the Command Line Interface (CLI) using the dotnet command.
We start by including the
Next, we implement our GameScreens. In this example, we use 2 GameScreens with a sprite that follows the Cursor.
Next, we define our
ScreenManger in our
Which we then assign and register as
GameComponent in the constructor.
Then we define the following methods to load the screens.
Which we then call from the