Skip to content

Commit 8002cc9

Browse files
Update AsepriteDotNet Version Used (#110)
* Update for AsepriteDotNet 1.9.0 * Update samples for AsepriteDotNet 1.9.0 * Update version number to 6.1.0
1 parent 535ac0d commit 8002cc9

File tree

11 files changed

+406
-19
lines changed

11 files changed

+406
-19
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<NeutralLanguage>en</NeutralLanguage>
2121
<ImplicitUsings>enable</ImplicitUsings>
2222
<Nullable>enable</Nullable>
23-
<Version>6.0.7</Version>
23+
<Version>6.1.0</Version>
2424
</PropertyGroup>
2525

2626
<!-- Setup Code Analysis using the .editorconfig file -->

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
A Cross Platform C# Library That Adds Support For Aseprite Files in MonoGame Projects.
55

66
[![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)
7-
[![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)
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)
88
[![License: MIT](https://img.shields.io/badge/📃%20license-MIT-blue?style=flat)](LICENSE)
99
[![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)
1010

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

3535
# Usage

examples/AnimatedTilemapExample/Game1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected override void LoadContent()
4747
/// Create an animated tilemap from the file based on all frames.
4848
///
4949
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
50-
_animatedTilemap = aseFile.CreateAnimatedTilemap(GraphicsDevice);
50+
_animatedTilemap = aseFile.CreateAnimatedTilemap(GraphicsDevice, onlyVisibleLayers: true);
5151

5252
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
5353
///

examples/ContentPipelineExample/Game1.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,19 @@ protected override void LoadContent()
3737
///
3838
/// Do something with i (see the other examples for more information
3939
///
40+
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
41+
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
42+
///
4043
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
41-
SpriteSheet sheet = aseFile.CreateSpriteSheet(GraphicsDevice);
44+
SpriteSheet sheet = aseFile.CreateSpriteSheet(GraphicsDevice,
45+
onlyVisibleLayers: true,
46+
includeBackgroundLayer: false,
47+
includeTilemapLayers: false,
48+
mergeDuplicateFrames: true,
49+
borderPadding: 0,
50+
spacing: 0,
51+
innerPadding: 0);
52+
4253
_animatedSprite = sheet.CreateAnimatedSprite("walk");
4354
_animatedSprite.Play();
4455
}

examples/SpriteExample/Game1.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,15 @@ protected override void LoadContent()
4848
///
4949
/// Create a sprite from any frame in the aseprite file
5050
///
51+
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, parameters used below are optional.
52+
/// Their default values are shown.
53+
///
5154
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
52-
_sprite = aseFile.CreateSprite(GraphicsDevice, 0);
55+
_sprite = aseFile.CreateSprite(GraphicsDevice,
56+
0,
57+
onlyVisibleLayers: true,
58+
includeBackgroundLayer: false,
59+
includeTilemapLayers: false);
5360
}
5461

5562
protected override void Draw(GameTime gameTime)

examples/SpritesheetExample/Game1.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,18 @@ protected override void LoadContent()
5151
///
5252
/// Create a sprite sheet from any frame in the aseprite file
5353
///
54+
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
55+
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
56+
///
5457
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
55-
_spriteSheet = aseFile.CreateSpriteSheet(GraphicsDevice);
58+
_spriteSheet = aseFile.CreateSpriteSheet(GraphicsDevice,
59+
onlyVisibleLayers: true,
60+
includeBackgroundLayer: false,
61+
includeTilemapLayers: false,
62+
mergeDuplicateFrames: true,
63+
borderPadding: 0,
64+
spacing: 0,
65+
innerPadding: 0);
5666

5767
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
5868
///

examples/TextureAtlasExample/Game1.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,18 @@ protected override void LoadContent()
5151
///
5252
/// Create a texture atlas from the aseprite file
5353
///
54+
/// The onlyVisibleLayers, includeBackgroundLayer, includeTilemapLayers, mergeDuplicateLayers, borderPadding,
55+
/// spacing, and innerPadding parameters used below are optional. Their default values are shown.
56+
///
5457
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
55-
_atlas = aseFile.CreateTextureAtlas(GraphicsDevice);
58+
_atlas = aseFile.CreateTextureAtlas(GraphicsDevice,
59+
onlyVisibleLayers: true,
60+
includeBackgroundLayer: false,
61+
includeTilemapLayers: false,
62+
mergeDuplicateFrames: true,
63+
borderPadding: 0,
64+
spacing: 0,
65+
innerPadding: 0);
5666

5767
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
5868
///

examples/TilemapExample/Game1.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ protected override void LoadContent()
4545
///
4646
/// Create a tilemap from the file based on the frame the tilemap is on.
4747
///
48+
/// The onlyVisibleLayers parameter is optional. It's default value is shown
49+
///
4850
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
49-
_tilemap = aseFile.CreateTilemap(GraphicsDevice, frameIndex: 0);
51+
_tilemap = aseFile.CreateTilemap(GraphicsDevice, frameIndex: 0, onlyVisibleLayers: true);
5052

5153
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
5254
///

source/MonoGame.Aseprite.Content.Pipeline/MonoGame.Aseprite.Content.Pipeline.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
<!-- NuGet Package References -->
2525
<ItemGroup>
26+
<PackageReference Include="AsepriteDotNet" Version="1.9.0" />
2627
<PackageReference Include="MonoGame.Framework.Content.Pipeline" Version="3.8.2.1105" PrivateAssets="All" />
2728
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" PrivateAssets="All" />
28-
<PackageReference Include="AsepriteDotNet" Version="1.8.3" />
2929
</ItemGroup>
3030
</Project>

0 commit comments

Comments
 (0)