A lesson on using the state machine design pattern in Unity.
Made with Unity version 2021.3.16f1.
- Player Controller with state machine (
Moving,Jumping,Falling). - Ground and Wall tilemaps. Jump enabled on Ground.
- Enemy with Player respawn on collision. The lessons in the Resources below outline steps to add a state machine to the enemy.