Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.FootstepSounds Class Reference
Inheritance diagram for AC.FootstepSounds:

Public Types

enum  FootstepPlayMethod { Automatically, ViaAnimationEvents }
 

Public Member Functions

void PlayFootstep ()
 

Public Attributes

AudioClip [] footstepSounds
 
AudioClip [] runSounds
 
Sound soundToPlayFrom
 
FootstepPlayMethod footstepPlayMethod = FootstepPlayMethod.ViaAnimationEvents
 
Char character
 
bool doGroundedCheck
 
float walkSeparationTime = 0.5f
 
float runSeparationTime = 0.25f
 

Detailed Description

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

Member Function Documentation

◆ PlayFootstep()

void AC.FootstepSounds.PlayFootstep ( )

Plays one of the footstepSounds at random on the assigned Sound object.

Member Data Documentation

◆ character

Char AC.FootstepSounds.character

The Player or NPC that this component is for

◆ doGroundedCheck

bool AC.FootstepSounds.doGroundedCheck

If True, and character is assigned, sounds will only play when the character is grounded

◆ footstepPlayMethod

FootstepPlayMethod AC.FootstepSounds.footstepPlayMethod = FootstepPlayMethod.ViaAnimationEvents

How the sounds are played

◆ footstepSounds

AudioClip [] AC.FootstepSounds.footstepSounds

An array of footstep AudioClips to play at random

◆ runSeparationTime

float AC.FootstepSounds.runSeparationTime = 0.25f

The separation time between sounds when running

◆ runSounds

AudioClip [] AC.FootstepSounds.runSounds

An array of footstep AudioClips to play at random when running - if left blank, normal sounds will play

◆ soundToPlayFrom

Sound AC.FootstepSounds.soundToPlayFrom

The Sound object to play from

◆ walkSeparationTime

float AC.FootstepSounds.walkSeparationTime = 0.5f

The separation time between sounds when walking