![]() |
Adventure Creator
1.81.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
|
Public Types | |
enum | FootstepPlayMethod { Automatically, ViaAnimationEvents } |
Public Member Functions | |
void | PlayFootstep () |
void | RecordOriginalRelativeSound () |
Public Attributes | |
Sound | soundToPlayFrom |
FootstepPlayMethod | footstepPlayMethod = FootstepPlayMethod.ViaAnimationEvents |
Char | character |
bool | doGroundedCheck = false |
bool | doMovementCheck = true |
bool | autoDetectSurface = true |
float | raycastLength = 0.5f |
LayerMask | layerMask = new LayerMask () |
float | pitchVariance = 0f |
float | volumeVariance = 0f |
float | walkSeparationTime = 0.5f |
float | runSeparationTime = 0.25f |
Protected Attributes | |
float | originalRelativeSound = 1f |
int | lastIndex |
AudioSource | audioSource |
float | delayTime |
Properties | |
Surface | CurrentSurface [get, set] |
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.autoDetectSurface = true |
If True, then raycasting will be used to auto-detect the current Surface
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
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
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
|
getset |
The current surface to get sounds from