I tried to write if and else to build a statemachine script component.
And I find that I will have to write so many conditions, because the Player has so many states: Idle, Run, Jump, Attack...
And then every state has some value like Animating, CanBreak... I even have to emit events in the Animator, because I want the statemachine can know what movement is breakable, and what is not.
I leaned that I could write a base state class, then write some children state classes(idle, run, etc...), based on the base state class.
But now I know the bolt is free to use, can I use it to build the state machine parts?
How do you suggest?
↧