![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Types | |
enum | FootstepPlayMethod { Automatically, ViaAnimationEvents } |
Public Member Functions | |
void | PlayFootstep () |
void | RecordOriginalRelativeSound () |
Public Attributes | |
AudioClip[] | footstepSounds |
AudioClip[] | runSounds |
Sound | soundToPlayFrom |
FootstepPlayMethod | footstepPlayMethod = FootstepPlayMethod.ViaAnimationEvents |
Char | character |
bool | doGroundedCheck = false |
bool | doMovementCheck = true |
float | pitchVariance = 0f |
float | volumeVariance = 0f |
float | walkSeparationTime = 0.5f |
float | runSeparationTime = 0.25f |
Protected Member Functions | |
void | Awake () |
void | Update () |
void | PlaySound (AudioClip[] clips, bool isRunSound) |
void | PlaySound (AudioClip clip, bool isRunSound) |
Protected Attributes | |
float | originalRelativeSound = 1f |
int | lastIndex |
AudioSource | audioSource |
float | delayTime |
A component that can play footstep sounds whenever a Mecanim-animated Character moves. The component stores an array of AudioClips, one of which is played at random whenever the PlayFootstep method is called. This method should be invoked as part of a Unity AnimationEvent: http://docs.unity3d.com/Manual/animeditor-AnimationEvents.html
void AC.FootstepSounds.PlayFootstep | ( | ) |
Plays one of the footstepSounds at random on the assigned Sound object.
void AC.FootstepSounds.RecordOriginalRelativeSound | ( | ) |
Records the associated Sound component's relative volume.
bool AC.FootstepSounds.doGroundedCheck = false |
If True, and character is assigned, sounds will only play when the character is grounded
bool AC.FootstepSounds.doMovementCheck = true |
If True, and character is assigned, sounds will only play when the character is moving
FootstepPlayMethod AC.FootstepSounds.footstepPlayMethod = FootstepPlayMethod.ViaAnimationEvents |
How the sounds are played
AudioClip [] AC.FootstepSounds.footstepSounds |
An array of footstep AudioClips to play at random
float AC.FootstepSounds.pitchVariance = 0f |
How much the audio pitch can randomly vary by
float AC.FootstepSounds.runSeparationTime = 0.25f |
The separation time between sounds when running
AudioClip [] AC.FootstepSounds.runSounds |
An array of footstep AudioClips to play at random when running - if left blank, normal sounds will play
float AC.FootstepSounds.volumeVariance = 0f |
How much the audio volume can randomly vary by
float AC.FootstepSounds.walkSeparationTime = 0.5f |
The separation time between sounds when walking