Make the FSM_STATE work better with optional loggins set by a define and standardize on using enum class by default.
This commit is contained in:
parent
8df6898d0b
commit
0aeb5b4ceb
8 changed files with 49 additions and 42 deletions
|
@ -65,11 +65,11 @@ class GameEngine : DeadSimpleFSM<GameState, GameEvent> {
|
|||
|
||||
void event(GameEvent ev) {
|
||||
switch(_state) {
|
||||
FSM_STATE_LOG(GameState, START, start, ev);
|
||||
FSM_STATE_LOG(GameState, IDLE, idle, ev);
|
||||
FSM_STATE_LOG(GameState, DEAD, dead, ev);
|
||||
FSM_STATE_LOG(GameState, SUCCESS, success, ev);
|
||||
FSM_STATE_LOG(GameState, FAILURE, failure, ev);
|
||||
FSM_STATE(GameState, START, start, ev);
|
||||
FSM_STATE(GameState, IDLE, idle, ev);
|
||||
FSM_STATE(GameState, DEAD, dead, ev);
|
||||
FSM_STATE(GameState, SUCCESS, success, ev);
|
||||
FSM_STATE(GameState, FAILURE, failure, ev);
|
||||
case GameState::IN_ROUND: {
|
||||
string hit_type = "";
|
||||
in_round(ev, hit_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue