So I have a state machine like this:
enum {Move, Attack}
var state = Move
func physics(delta):
match state:
Move:
do_moving()
Attack:
do_attack()
And I want to do the attacking (animation or whatever it does), while responding the Move state (like still moving, but change the animation for example), switching the state to Attack should never work i guess, what's the better solution?