Player Animation
The PlayerAnimation
class is responsible for handling the animation states and transitions for player characters.
Properties
private PlayerWorker playerWorker
: References thePlayerWorker
associated withPlayerAnimation
public Animator animator
: ReferencesAnimator
component attached to the player.
Constructor
public PlayerAnimation(PlayerWorker playerWorker)
: Initializes a new instance of thePlayerAnimation
class, assigning thePlayerWorker
and getting theAnimator
component from the player gameobject.
Methods
public void ResetAnimator()
: Resets all animator parameters to their default state.public void SetAnimation(AnimationType animationType, bool value)
: Sets the specified animation type to the provided boolean value.public void PlayRotationAnimation()
: Determines and plays the appropriate rotation animation based on the player's current rotation angle.
Last updated