StateMachineKit 2.0.0
dotnet add package StateMachineKit --version 2.0.0
NuGet\Install-Package StateMachineKit -Version 2.0.0
<PackageReference Include="StateMachineKit" Version="2.0.0" />
<PackageVersion Include="StateMachineKit" Version="2.0.0" />
<PackageReference Include="StateMachineKit" />
paket add StateMachineKit --version 2.0.0
#r "nuget: StateMachineKit, 2.0.0"
#:package StateMachineKit@2.0.0
#addin nuget:?package=StateMachineKit&version=2.0.0
#tool nuget:?package=StateMachineKit&version=2.0.0
StateMachineKit
StateMachineKit is a flexible, plug-and-play finite state machine (FSM) toolkit for .NET / game development.
It provides a lightweight abstraction for defining states, transitioning between them, and integrating with engines
(such as Godot via the companion StateMachineKit.Godot
package).
Packages
Package | Version | Description |
---|---|---|
StateMachineKit | 2.0.0 | Core abstractions (interfaces, discovery attribute, helpers) supporting .NET 8 and .NET Standard 2.1. |
StateMachineKit.Godot | 0.0.1 | Godot (C#) integration layer depending on the core package. |
Key Features
- Generic, owner-driven state machine:
IStateMachine<TContext>
/IState<TContext>
- Attribute-based automatic state discovery (
[DiscoverableState]
) - Extension methods for ticking (Update / FixedUpdate)
- Pluggable design; you keep your concrete state definitions decoupled
- Godot integration package for engine-specific hooks
Quick Start (Core)
public sealed class IdleState : IState<MyActor> { /* ... */ }
public sealed class MoveState : IState<MyActor> { /* ... */ }
// Assuming you've already defined classes
// that implement IStateMachine and IStateOwner.
var actor = new MyActor("Player");
var fsm = FiniteStateMachine.Create(actor);
fsm.Initialize<IdleState>();
// In your update loop
fsm.Tick(deltaTime);
Godot Integration
Install the StateMachineKit.Godot
NuGet package and reference it from your Godot C# project. The Godot layer
adds engine-friendly owner definitions and can be extended to tie into lifecycle callbacks (_Process
, _PhysicsProcess
).
Versioning
- Core at 2.0.0 introduces improved initialization semantics and packaging metadata
- Godot integration starts at 0.0.1 (early preview)
Roadmap
- Source generator for compile-time state registration
- Transition validation & visualization hooks
- Async lifecycle (optional)
Contributing
Issues and PRs are welcome. Please include tests for behavioral changes.
License
MIT – see license.md
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on StateMachineKit:
Package | Downloads |
---|---|
StateMachineKit.Godot
Godot integration layer for StateMachineKit finite state machine library. |
GitHub repositories
This package is not used by any popular GitHub repositories.