Zen.Assets
0.1.3
See the version list below for details.
dotnet add package Zen.Assets --version 0.1.3
NuGet\Install-Package Zen.Assets -Version 0.1.3
<PackageReference Include="Zen.Assets" Version="0.1.3" />
paket add Zen.Assets --version 0.1.3
#r "nuget: Zen.Assets, 0.1.3"
// Install Zen.Assets as a Cake Addin #addin nuget:?package=Zen.Assets&version=0.1.3 // Install Zen.Assets as a Cake Tool #tool nuget:?package=Zen.Assets&version=0.1.3
Zen.Assets
This is a helper project for a MonoGame project to store game assets. It can be used to store and retreieve SpriteFonts, Textures, TextureAtlases, Sounds and Animations.
Nuget package download: https://www.nuget.org/packages/Zen.Assets/0.1.3
Example
To use: (for resources compiled to xnb's)
// assumes Arial-12.xnb is in .\Content\Fonts folder
AssetsManager.Instance.AddSpriteFont("Arial-12", "Fonts\\Arial-12");
SpriteFont font = AssetsManager.Instance.GetSpriteFont("Arial-12");
// assumes cursor.xnb is in .\Content\Textures folder
AssetsManager.Instance.AddTexture("Cursor", "Textures\\cursor");
Texture2D texture = AssetsManager.Instance.GetTexture("Cursor");
(for "native" resources, i.e. ttf, png, etc.)
// this will load everything under Fonts (ttf), Textures (png) and TextureAtlases (atlasspec) folders,
// bake them and store them in the AssetsManager
ContentLoader.LoadContent(
$@"{Directory.GetCurrentDirectory()}\Content\",
"Fonts",
"Textures",
"TextureAtlases",
graphicsDevice);
// assumes Arial.ttf is in .\Content\Fonts folder
SpriteFont font = AssetsManager.Instance.GetSpriteFont("Arial");
Developer
Written by Greg Moller (greg.moller@gmail.com)
If you have any questions drop me a line at the above email.
License
Licensed under the MIT License. See the LICENCE file for more information.
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 | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- MonoGame.Framework.DesktopGL (>= 3.8.0.1641)
- Newtonsoft.Json (>= 12.0.3)
- SpriteFontPlus (>= 0.8.5.43)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Zen.Assets:
Package | Downloads |
---|---|
Zen.GuiControls
A project for user controls for use with MonoGame. |
GitHub repositories
This package is not used by any popular GitHub repositories.