A class in Root.Township, the global namespace.
Animator state behaviour that plays a sound at the animated object when the state is entered, after an optional delay.
Constructors
| Member | What it is |
|---|
PlaySound() | Creates a PlaySound with default values. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private float delay | Seconds to wait before playing. |
private float maxFalloffDistance | Obsolete; now set on the sound effect set. |
private float minFalloffDistance | Obsolete; now set on the sound effect set. |
private SoundEffect sound | Old single sound, used to fill soundSet if that's empty. |
private SoundEffectSet soundSet | The sound to play. |
private float volume | Obsolete; now set on the sound effect set. |
Methods
| Member | What it is |
|---|
override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) | Waits delay seconds, then plays soundSet at the animator's position. |