Skip to content

Commit

Permalink
Update AsepriteDotNet Version Used (#110)
Browse files Browse the repository at this point in the history
* Update for AsepriteDotNet 1.9.0

* Update samples for AsepriteDotNet 1.9.0

* Update version number to 6.1.0
  • Loading branch information
AristurtleDev authored Sep 27, 2024
1 parent 535ac0d commit 8002cc9
Show file tree
Hide file tree
Showing 11 changed files with 406 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<NeutralLanguage>en</NeutralLanguage>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>6.0.7</Version>
<Version>6.1.0</Version>
</PropertyGroup>

<!-- Setup Code Analysis using the .editorconfig file -->
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A Cross Platform C# Library That Adds Support For Aseprite Files in MonoGame Projects.

[![build-and-test](https://github.com/AristurtleDev/monogame-aseprite/actions/workflows/main.yml/badge.svg)](https://github.com/AristurtleDev/monogame-aseprite/actions/workflows/main.yml)
[![NuGet 6.0.7](https://img.shields.io/nuget/v/MonoGame.Aseprite?color=blue&style=flat-square)](https://www.nuget.org/packages/MonoGame.Aseprite/6.0.7)
[![NuGet 6.1.0](https://img.shields.io/nuget/v/MonoGame.Aseprite?color=blue&style=flat-square)](https://www.nuget.org/packages/MonoGame.Aseprite/6.1.0)
[![License: MIT](https://img.shields.io/badge/📃%20license-MIT-blue?style=flat)](LICENSE)
[![Twitter](https://img.shields.io/badge/%20-Share%20On%20Twitter-555?style=flat&logo=twitter)](https://twitter.com/intent/tweet?text=MonoGame.Aseprite%20by%20%40aristurtledev%0A%0AA%20cross-platform%20C%23%20library%20that%20adds%20support%20for%20Aseprite%20files%20in%20MonoGame%20projects.%20https%3A%2F%2Fgithub.com%2FAristurtleDev%2Fmonogame-aseprite%0A%0A%23monogame%20%23aseprite%20%23dotnet%20%23csharp%20%23oss%0A)

Expand All @@ -29,7 +29,7 @@ A Cross Platform C# Library That Adds Support For Aseprite Files in MonoGame Pro
# Installation
Install via NuGet
```
dotnet add package MonoGame.Aseprite --version 6.0.7
dotnet add package MonoGame.Aseprite --version 6.1.0
```

# Usage
Expand Down
2 changes: 1 addition & 1 deletion examples/AnimatedTilemapExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override void LoadContent()
/// Create an animated tilemap from the file based on all frames.
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_animatedTilemap = aseFile.CreateAnimatedTilemap(GraphicsDevice);
_animatedTilemap = aseFile.CreateAnimatedTilemap(GraphicsDevice, onlyVisibleLayers: true);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
Expand Down
13 changes: 12 additions & 1 deletion examples/ContentPipelineExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,19 @@ protected override void LoadContent()
///
/// Do something with i (see the other examples for more information
///
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
SpriteSheet sheet = aseFile.CreateSpriteSheet(GraphicsDevice);
SpriteSheet sheet = aseFile.CreateSpriteSheet(GraphicsDevice,
onlyVisibleLayers: true,
includeBackgroundLayer: false,
includeTilemapLayers: false,
mergeDuplicateFrames: true,
borderPadding: 0,
spacing: 0,
innerPadding: 0);

_animatedSprite = sheet.CreateAnimatedSprite("walk");
_animatedSprite.Play();
}
Expand Down
9 changes: 8 additions & 1 deletion examples/SpriteExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ protected override void LoadContent()
///
/// Create a sprite from any frame in the aseprite file
///
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, parameters used below are optional.
/// Their default values are shown.
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_sprite = aseFile.CreateSprite(GraphicsDevice, 0);
_sprite = aseFile.CreateSprite(GraphicsDevice,
0,
onlyVisibleLayers: true,
includeBackgroundLayer: false,
includeTilemapLayers: false);
}

protected override void Draw(GameTime gameTime)
Expand Down
12 changes: 11 additions & 1 deletion examples/SpritesheetExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,18 @@ protected override void LoadContent()
///
/// Create a sprite sheet from any frame in the aseprite file
///
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_spriteSheet = aseFile.CreateSpriteSheet(GraphicsDevice);
_spriteSheet = aseFile.CreateSpriteSheet(GraphicsDevice,
onlyVisibleLayers: true,
includeBackgroundLayer: false,
includeTilemapLayers: false,
mergeDuplicateFrames: true,
borderPadding: 0,
spacing: 0,
innerPadding: 0);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
Expand Down
12 changes: 11 additions & 1 deletion examples/TextureAtlasExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,18 @@ protected override void LoadContent()
///
/// Create a texture atlas from the aseprite file
///
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_atlas = aseFile.CreateTextureAtlas(GraphicsDevice);
_atlas = aseFile.CreateTextureAtlas(GraphicsDevice,
onlyVisibleLayers: true,
includeBackgroundLayer: false,
includeTilemapLayers: false,
mergeDuplicateFrames: true,
borderPadding: 0,
spacing: 0,
innerPadding: 0);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
Expand Down
4 changes: 3 additions & 1 deletion examples/TilemapExample/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ protected override void LoadContent()
///
/// Create a tilemap from the file based on the frame the tilemap is on.
///
/// The onlyVisibleLayers parameter is optional. It's default value is shown
///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_tilemap = aseFile.CreateTilemap(GraphicsDevice, frameIndex: 0);
_tilemap = aseFile.CreateTilemap(GraphicsDevice, frameIndex: 0, onlyVisibleLayers: true);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

<!-- NuGet Package References -->
<ItemGroup>
<PackageReference Include="AsepriteDotNet" Version="1.9.0" />
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.2.1105" PrivateAssets="All" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" PrivateAssets="All" />
<PackageReference Include="AsepriteDotNet" Version="1.8.3" />
</ItemGroup>
</Project>
Loading

0 comments on commit 8002cc9

Please sign in to comment.