A class in Root.Township, Alta.Networking.Animation.
Plays sound effects from animation events. Sits next to an Animator; an animation event calls PlaySound with a clip index.
Constructors
| Member | What it is |
|---|
AnimationBasedSound() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private SoundEffectSet[] clips | The sound effect sets to pick from. |
private SoundEffect[] clipsToPlay | Obsolete list of single sound effects, kept as a fallback and migrated to clips. |
Methods
| Member | What it is |
|---|
void PlaySound(int clipIndex) | Plays the sound at the given index at this object's position, using clips, or the old clipsToPlay list if clips is empty. |