Closed nsk90 closed 3 years ago
Hi @nsk90 How can I use in my states?? I mean that I have one state and in that state I want make child state to be use Parallelly. AddState(State1){ "run all states here parelle" }
Hi, in your case it should be set in State1 base class constructor argument. like this:
object State1 : DefaultState("state1", childMode = ChildMode.PARALLEL)
you can find docs here https://github.com/nsk90/kstatemachine/wiki#parallel-states and some other code usages in tests: https://github.com/nsk90/kstatemachine/blob/master/kstatemachine/src/test/kotlin/ru/nsk/kstatemachine/ParallelStatesTest.kt
done in c1c7a3d7