ImpactSound

class in Clatter.Unity

Inherits from Sound, MonoBehaviour

A sound generated by an impact event and ClatterManager. An ImpactSound self-destructs when the audio is done playing.

Static Fields

Name Type Description Default Value
timeout double Timeout and destroy a Sound if it hasn't received new samples data after this many seconds. Inherited from Sound. 0.1
onCreate Sound Invoked when the Sound is created. Inherited from Sound.
spatialize bool If true, spatialize each AudioSource. Inherited from Sound. true

Fields

Name Type Description Default Value
onEnd Action< int > Invoked when the audio ends. Inherited from Sound.

Static Methods

Create< T >

public static T Create< T >(Samples samples, Vector3d position, int id)

Create a new sound.

Inherited from Sound.

Name Type Description
samples Samples The audio samples.
position Vector3d The position of the audio source.
id int The audio source ID.

Methods

End

public void End()

Gracefully end the audio and prepare to self-destruct.

Inherited from Sound.