MonoGame.Library
1.0.0
dotnet add package MonoGame.Library --version 1.0.0
NuGet\Install-Package MonoGame.Library -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonoGame.Library" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MonoGame.Library --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MonoGame.Library, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MonoGame.Library as a Cake Addin #addin nuget:?package=MonoGame.Library&version=1.0.0 // Install MonoGame.Library as a Cake Tool #tool nuget:?package=MonoGame.Library&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MonoGame.Library
A Library for easing the use of MonoGame
How to use
using MonoGame.Library
using MonoGame.Library.Components;
using XNA = Microsoft.Xna.Framework;
class MyGameInputs : GameInputs
{
public MyGameInputs()
: base(null)
{ }
public bool IsMouseLeftCliched => Clicked(MouseButton.Left);
}
class Game1 : Game<MyGameInputs>
{
public Cursor Cursor { get; }
public FpsUps FPS { get; }
public Game1()
: base(new MyGameInputs())
{
Components.Add(FPS = new FpsUps(this, "Fonts/Arial", XNA.Color.Black) { TargetFPS = 60 /*Target FPS to null for maximum fps*/
/*VSync to true/false*/
/*You can draw it with Visible*/ });
Components.Add(Cursor = new Cursor(this, "Images/Cursor", new XNA.Point(24)) { Offset = new XNA.Point(24, 0) /*You can use IsNative/Visible*/ });
/*
Add all of you componnents with Components.Add
for your components, use MonoGame.Library.Components base classes
*/
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
/// <param name="gameInputs">Provides a snapshot of game inputs.</param>
protected override void Update(XNA.GameTime gameTime, MyGameInputs gameInputs)
{
if (gameInputs.Exit)
Exit();
// TODO: Add your update logic here
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(XNA.GameTime gameTime)
{
GraphicsDevice.Clear(XNA.Color.CornflowerBlue);
using (var spriteBatch = SpriteBatch.Begin())
{
// You can Draw here
// You can also offset the origin
using (var offset = spriteBatch.Offset(new XNA.Vector2D(5, 5)))
{
}
}
base.Draw(gameTime);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 1,033 | 7/19/2018 |