unity-finite-state-machine

A finite state machine using push and pop with a stack (inspired by the Pushdown automaton - https://en.wikipedia.org/wiki/Pushdown_automaton)

Demo Scene

Contains a game object with a state machine controlled by your keyboard.

Keys

A: Enter jumping state; S: Enter idle state.

Dependencies

The project needs TextMesh Pro.

Next steps

  • Remove duplicated timer code used to pop up the current state tick;
  • Remove all code for the state name pop up and add a better solution.

Peek() every frame

For demonstration purposes only. This is not the best approach to check and run the current state's Tick method.