Class EngineAudio
Plays the engine sounds based on the current state of the engine.
Namespace: YACC.Audio
Assembly: .dll
Syntax
public class EngineAudio : MonoBehaviour
Remarks
Requires a CarEngineController component to be attached, for a custom implementation this can be used as a reference. The engine sounds are played on separate AudioSources to allow for more control over the volume and pitch of each sound.
Fields
Name | Description |
---|---|
idleMaximumPitch | The highest pitch to play for your idle engine sound clip. |
idleMinimumPitch | The lowest pitch to play for your idle engine sound clip. |
idleSoundClip | The sound clip to play when the engine is idling. |
maximumDistance | The maximum distance at which the engine sounds can be heard. |
restMaximumPitch | The highest pitch to play for your resting engine sound clip. |
restMinimumPitch | The lowest pitch to play for your resting engine sound clip. |
restSoundClip | The sound clip to play when the engine throttle is closed. |
reverseMaximumPitch | The highest pitch to play for your reverse engine sound clip. |
reverseMinimumPitch | The lowest pitch to play for your reverse engine sound clip. |
reverseSoundClip | The sound clip to play when the engine is in reverse. |
runningMaximumPitch | The highest pitch to play for your running engine sound clip. |
runningMinimumPitch | The lowest pitch to play for your running engine sound clip. |
runningSoundClip | The sound clip to play when the engine throttle is open. |
startingSoundClip | The sound clip to play when the engine is starting. |
Methods
Name | Description |
---|---|
StartEngine() | Coroutine to play the ignition sound. |