fix: state machine only acts if enabled
This commit is contained in:
parent
e303c853e9
commit
71bd8cd630
|
|
@ -19,7 +19,7 @@ void StateMachine::switch_to_state(State *state) {
|
|||
}
|
||||
|
||||
void StateMachine::process(double delta) {
|
||||
if (this->current_state) {
|
||||
if (this->current_state && is_enabled()) {
|
||||
this->current_state->process(delta);
|
||||
String new_state{ this->current_state->get_next_state() };
|
||||
if (new_state != this->current_state->get_class()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue