Handles footstep sounds for NPCs during animation states using StateMachineBehaviour. Plays two footstep sounds at specified points in the animation loop.
More...
|
| override void | OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) |
| | Called when the animation state is entered. Resets internal state and loads footstep audio clips.
|
| |
| override void | OnStateUpdate (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) |
| | Called every frame the animation state is active. Plays footstep sounds based on animation progress.
|
| |
| override void | OnStateExit (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) |
| | Called when the animation state is exited. Resets internal state.
|
| |
|
| bool | running = false |
| | If true, run footstep sounds are used instead of walk sounds.
|
| |
| float | firstFootstepPercent_float = 0.30f |
| | Percentage of animation duration when the first footstep should occur.
|
| |
| float | secondFootstepPercent_float = 0.81f |
| | Percentage of animation duration when the second footstep should occur.
|
| |
Handles footstep sounds for NPCs during animation states using StateMachineBehaviour. Plays two footstep sounds at specified points in the animation loop.
◆ OnStateEnter()
| override void footstep_manager_npc.OnStateEnter |
( |
Animator |
animator, |
|
|
AnimatorStateInfo |
stateInfo, |
|
|
int |
layerIndex |
|
) |
| |
Called when the animation state is entered. Resets internal state and loads footstep audio clips.
- Parameters
-
| animator | The Animator playing the state. |
| stateInfo | Information about the current state. |
| layerIndex | The layer index the state is playing on. |
◆ OnStateExit()
| override void footstep_manager_npc.OnStateExit |
( |
Animator |
animator, |
|
|
AnimatorStateInfo |
stateInfo, |
|
|
int |
layerIndex |
|
) |
| |
Called when the animation state is exited. Resets internal state.
- Parameters
-
| animator | The Animator playing the state. |
| stateInfo | Information about the current state. |
| layerIndex | The layer index the state is playing on. |
◆ OnStateUpdate()
| override void footstep_manager_npc.OnStateUpdate |
( |
Animator |
animator, |
|
|
AnimatorStateInfo |
stateInfo, |
|
|
int |
layerIndex |
|
) |
| |
Called every frame the animation state is active. Plays footstep sounds based on animation progress.
- Parameters
-
| animator | The Animator playing the state. |
| stateInfo | Information about the current state. |
| layerIndex | The layer index the state is playing on. |
◆ firstFootstepPercent_float
| float footstep_manager_npc.firstFootstepPercent_float = 0.30f |
Percentage of animation duration when the first footstep should occur.
◆ running
| bool footstep_manager_npc.running = false |
If true, run footstep sounds are used instead of walk sounds.
◆ secondFootstepPercent_float
| float footstep_manager_npc.secondFootstepPercent_float = 0.81f |
Percentage of animation duration when the second footstep should occur.
The documentation for this class was generated from the following file: