The player movement system for Echoes of Marigold, a 2D Metroidvania built in Unity.
The states
A 2D Blend Tree covers the vertical states: idle, jumping, mid-air, falling and landing. Blending between them gives smooth transitions and directional control instead of hard cuts from one animation to the next.
Keeping animation in sync
Running, jumping and attacking all stay synchronised with their animations. An attack that fires before its animation reads as unresponsive, and one that fires after reads as laggy, so the timing has to match.