Skip to content

Commit 5e1186b

Browse files
Update README.md
1 parent 73fb95e commit 5e1186b

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@ If you like or are using this project please give it a star. Thanks!
1010
# Why SimpleStateMachine?
1111
Create state machine in **three** steps :
1212

13-
**1.** Create scheme in [this node editor🔗](https://github.com/SimpleStateMachine/SimpleStateMachineNodeEditor)
14-
15-
**2.** Load scheme in your project using [library📚](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary)
16-
17-
**3.** Describe your app logic and run the state machine🚀
13+
**1.** Create scheme in [this node editor🔗](https://github.com/SimpleStateMachine/SimpleStateMachineNodeEditor) and load it in your project using [library📚](https://github.com/SimpleStateMachine/SimpleStateMachineLibrary)
14+
```C#
15+
StateMachine stateMachine = new StateMachine("scheme.xml");
16+
```
17+
**2.** Describe your app logic on events⚡
18+
```C#
19+
stateMachine.GetState("State1").OnExit(Action1);
20+
stateMachine.GetState("State2").OnEntry(Action2);
21+
stateMachine.GetTransition("Transition1").OnInvoke(Action3);
22+
stateMachine.OnChangeState(Action4);
23+
```
24+
**3.** Run the state machine🚘
25+
```C#
26+
stateMachine.Start();
27+
```
1828

1929
## Features💡
2030
### Custom Window with Visual Studio design

0 commit comments

Comments
 (0)