SimpleStateMachine / SimpleStateMachineLibrary

📚 A simple library for realization state machines in C# code
MIT License
49 stars 14 forks source link
csharp finite-state-machine library netstandard simple-state-machine simplestatemachine state state-machine statemachine

NuGet Pre Release NuGet Downloads Build Status

SimpleStateMachineLibrary

A C# library for realization simple state-machine on .Net

Give a Star! :star:

If you like or are using this project please give it a star. Thanks!

Why SimpleStateMachine?

Create state machine in three steps :

1. Create scheme in node editor🔗 and load it in your project using this library📚

StateMachine stateMachine = new StateMachine("scheme.xml");

2. Describe your app logic on events⚡

stateMachine.GetState("State1").OnExit(Action1);
stateMachine.GetState("State2").OnEntry(Action2);
stateMachine.GetTransition("Transition1").OnInvoke(Action3);
stateMachine.OnChangeState(Action4);

3. Run the state machine🚘

stateMachine.Start();

Features💡

State machine properties:

Useful extensions for work:

Getting Started📂

Install from Nuget:

 Install-Package SimpleStateMachineLibrary 

Documentation📄

Documentation here: https://github.com/SimpleStateMachine/SimpleStateMachineLibrary/wiki

FAQ❔

If you think you have found a bug, create a github issue.

But if you just have questions about how to use:

License📑

Copyright (c) SimpleStateMachine

Licensed under the MIT license.