Player Animation

The Player Animation script has no public inspector properties, but depends on the 'Animator' component.

Internals

The core of the player animation component is the 'OnUpdatePlayerState()' method, which listens to the PlayerMovement event of the same name, like so:

PlayerMovement.onUpdatePlayerState += OnUpdatePlayerState;

The onUpdatePlayerState event passes along the PlayerState structure, which contains both the resulting player state as well as the raw input from the player.

Last updated