diff options
author | chai <chaifix@163.com> | 2018-11-06 16:12:56 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-06 16:12:56 +0800 |
commit | 9c5dc853ec5ceba809e7f02cdde87c90544a45e1 (patch) | |
tree | 709bcc9409c8088a0d2be83ab14ddd230512b23f /examples/particle_system/main.cpp | |
parent | 1d1210d7932b287d66e27157701b92df764528cb (diff) |
*状态机条件使用多重条件
Diffstat (limited to 'examples/particle_system/main.cpp')
-rw-r--r-- | examples/particle_system/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/particle_system/main.cpp b/examples/particle_system/main.cpp index 0b7e191..f37027b 100644 --- a/examples/particle_system/main.cpp +++ b/examples/particle_system/main.cpp @@ -26,6 +26,7 @@ void onLoad() /*sm.addTransitionb("Empty", "Idle", "run", StateMachine::BOOL_IS, true); sm.addTransitionb("Idle", "Run", "run", StateMachine::BOOL_IS, false); */ + sm.addTransition("Run", "Idle", StateMachine::Conditions().andf()); sm.addTransitiont("Empty", "Idle", "run"); sm.addTransitiont("Idle", "Run", "run"); sm.setEnterListener([](const string& state, void* p) { |