Table of Contents

Class AnimationEventHandler

Handles animation events for the third-person character. Attach to the GameObject with the Animator component.

public class AnimationEventHandler : MonoBehaviour
Inheritance
AnimationEventHandler

Methods

OnFootStep(AnimationEvent)

Called by animation event on footstep frames.

public void OnFootStep(AnimationEvent animationEvent)

Parameters

animationEvent AnimationEvent

OnJump(AnimationEvent)

Called by animation event when jumping.

public void OnJump(AnimationEvent animationEvent)

Parameters

animationEvent AnimationEvent

OnJump(InputValue)

Overload to handle PlayerInput SendMessages callback. This prevents MissingMethodException when PlayerInput broadcasts OnJump.

public void OnJump(UnityEngine.InputSystem.InputValue value)

Parameters

value InputValue

OnLand(AnimationEvent)

Called by animation event when landing.

public void OnLand(AnimationEvent animationEvent)

Parameters

animationEvent AnimationEvent

PlaySound(AnimationEvent)

Generic method to play any sound from animation events. Pass the AudioClip as the objectReferenceParameter in the animation event.

public void PlaySound(AnimationEvent animationEvent)

Parameters

animationEvent AnimationEvent

SetSettings(ThirdPersonSettings)

Set the settings object at runtime.

public void SetSettings(ThirdPersonSettings newSettings)

Parameters

newSettings ThirdPersonSettings

SetSoundEffects(SoundSfxObject)

Set the sound effects object at runtime.

public void SetSoundEffects(SoundSfxObject sfx)

Parameters

sfx SoundSfxObject