ToolBX.Spritebound.Web
2.0.1-beta1
See the version list below for details.
dotnet add package ToolBX.Spritebound.Web --version 2.0.1-beta1
NuGet\Install-Package ToolBX.Spritebound.Web -Version 2.0.1-beta1
<PackageReference Include="ToolBX.Spritebound.Web" Version="2.0.1-beta1" />
paket add ToolBX.Spritebound.Web --version 2.0.1-beta1
#r "nuget: ToolBX.Spritebound.Web, 2.0.1-beta1"
// Install ToolBX.Spritebound.Web as a Cake Addin #addin nuget:?package=ToolBX.Spritebound.Web&version=2.0.1-beta1&prerelease // Install ToolBX.Spritebound.Web as a Cake Tool #tool nuget:?package=ToolBX.Spritebound.Web&version=2.0.1-beta1&prerelease
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 Newtonsoft.Json and System.Text are tested and supported but XML isn't.
Sprites.Jackal
Coming soon-ish : Complete animation system used in the Jackal 2D game engine.
Product | Versions 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. |
-
net7.0
- ToolBX.Mathemancy (>= 2.0.0)
- ToolBX.Spritebound (>= 2.0.1-beta1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0 | 91 | 9/27/2024 |
3.0.0-beta1 | 64 | 9/23/2024 |
2.2.0 | 133 | 1/13/2024 |
2.2.0-beta1 | 113 | 1/7/2024 |
2.0.5 | 153 | 6/19/2023 |
2.0.4 | 165 | 5/5/2023 |
2.0.2 | 167 | 4/27/2023 |
2.0.1 | 220 | 3/10/2023 |
2.0.1-beta1 | 146 | 3/3/2023 |
2.0.0 | 335 | 11/12/2022 |
1.0.3 | 400 | 8/10/2022 |
1.0.2 | 390 | 8/7/2022 |
1.0.1 | 384 | 8/4/2022 |
1.0.0 | 381 | 8/4/2022 |