Skip to content

Commit

Permalink
AsepriteSliceKey constructor was not assigning FrameIndex. It was bei…
Browse files Browse the repository at this point in the history
…ng passed by parameter but not being used. This should enable to use slices that have different positions through different frames (#34)
  • Loading branch information
nobledemon authored Jul 16, 2024
1 parent 77e3a5f commit a451409
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/AsepriteDotNet/Aseprite/Types/AsepriteSliceKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public sealed class AsepriteSliceKey

internal AsepriteSliceKey(AsepriteSliceKeyProperties keyProperties, AsepriteNinePatchProperties? ninePatchProperties, AsepritePivotProperties? pivotProperties)
{
FrameIndex = (int)keyProperties.FrameNumber;

Bounds = new Rectangle((int)keyProperties.X, (int)keyProperties.Y, (int)keyProperties.Width, (int)keyProperties.Height);

// If this is not a nine patch, make the center bounds equal to the key bounds.
Expand Down

0 comments on commit a451409

Please sign in to comment.