Skip to content

Commit fb27c80

Browse files
committed
update example
1 parent d969372 commit fb27c80

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Examples/Program.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ static void Method4(State state, Dictionary<string, object> parameters)
2424

2525
}
2626

27-
static Dictionary<string, object> parametersForStart = new Dictionary<string, object>() { { "Data1", "Test Data" } };
28-
2927
static void Main(string[] args)
3028
{
3129
StateMachine stateMachine = new StateMachine();
@@ -39,10 +37,10 @@ static void Main(string[] args)
3937
//Add transitions three ways:
4038

4139
//Standart way
42-
Transition transition2 = stateMachine.AddTransition("Transition2", state2, state3);
40+
Transition transition1 = stateMachine.AddTransition("Transition1", state1, state2);
4341

4442
//From state
45-
Transition transition1 = state1.AddTransitionFromThis("Transition1", state2);
43+
Transition transition2 = state2.AddTransitionFromThis("Transition2", state3);
4644

4745
//To state
4846
Transition transition3 = state4.AddTransitionToThis("Transition3", state3);
@@ -53,11 +51,11 @@ static void Main(string[] args)
5351
state3.OnExit(Method3);
5452
state4.OnExit(Method4);
5553

56-
//Set start set
54+
//Set start state
5755
state1.SetAsStartState();
5856

5957
//Start work
60-
stateMachine.Start(parametersForStart);
58+
stateMachine.Start();
6159
}
6260
}
6361
}

0 commit comments

Comments
 (0)