ToolBX.Spritebound 2.2.0

dotnet add package ToolBX.Spritebound --version 2.2.0
NuGet\Install-Package ToolBX.Spritebound -Version 2.2.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="ToolBX.Spritebound" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ToolBX.Spritebound --version 2.2.0
#r "nuget: ToolBX.Spritebound, 2.2.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 ToolBX.Spritebound as a Cake Addin
#addin nuget:?package=ToolBX.Spritebound&version=2.2.0

// Install ToolBX.Spritebound as a Cake Tool
#tool nuget:?package=ToolBX.Spritebound&version=2.2.0

Spritebound

Spritebound

Spritesheet and animation management for sprite-based projects.

The base package for Sprites is kept as generic as possible to be allowed to be used with any .NET engine or framework. Specific implementations will likely come eventually.

For now, this base package only includes container classes meant to be used as part of a larger animation system.

Static vs Animated spritesheet

StaticSpritesheets are used for inanimate sprite elements that are bundled under a single file. This could be tilesets, posters, items or UI elements.

AnimatedSpritesheets are used for animated sprite elements such as a character or a special effect.

Spritesheets have an ID property! What do I do with that??

It's up to you and your engine/framework. Jackal uses the ID internally because they are part of a collection and it's faster to look for a numeric ID than compare strings.

It's not ideal (and not very ToolBX-like, I admit) but you could just ignore it.

However, if you do want to use the ID property, the Spritesheet base class implements IAutoIncremented<int> which is part of the ToolBX.Unicity library. That library has an extension method to automatically "get the next available ID" in an IEnumerable<T> where T implements IAutoIncremented<int>.

SpritesheetMap

A map to a static spritesheet made up of sprites of equal size. Maps are automatically indexed by row from left to right.

Rough Trigger uses this for country flags and weapon icons among other things.

Events

Sometimes, you might need events to be triggered when a specific frame plays. This is what the FrameEvent class is there to achieve.

FrameEvent.Name is used to identify the event in-game. In other words; that name must be the exact same on both ends for it to be recognized.

FrameEvent.Origin is optionally used when your event also needs a position. This is usually reserved for things like when a gun is fired so that the game knows exactly where it's fired from.

Serialization

Both System.Text.Json and Newtonsoft.Json are tested and supported by default and do not require custom converters.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ToolBX.Spritebound:

Package Downloads
ToolBX.Spritebound.Web

Spritesheet management for websites.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.0 158 1/13/2024
2.2.0-beta1 95 1/7/2024
2.0.5 194 6/19/2023
2.0.4 195 5/5/2023
2.0.3 148 5/1/2023
2.0.2 172 4/27/2023
2.0.1 225 3/10/2023
2.0.1-beta1 135 3/3/2023
2.0.0 350 11/12/2022
2.0.0-beta1 135 10/4/2022
1.0.4 388 10/4/2022
1.0.3 495 8/10/2022
1.0.2 501 8/7/2022
1.0.1 590 7/22/2022
1.0.0 393 7/3/2022