DoopelPonger
Public Member Functions | Public Attributes | List of all members
PitchShiftAudioSelector Class Reference

Will play the sound effect at different pitches. This is to make sure things don't sound too repetative. More...

Inheritance diagram for PitchShiftAudioSelector:
Inheritance graph
[legend]
Collaboration diagram for PitchShiftAudioSelector:
Collaboration graph
[legend]

Public Member Functions

override void PlayClip (float volume)
 Plays the audio clip at a random pitch value. More...
 

Public Attributes

PlayOnceAudio playOnceAudioPrefab
 Base sound effect to play. More...
 
float [] pitchShiftValues
 The discrete values of pitches to choose from when playing the sound effect. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AudioSelector
PlayOnceAudio InstantiatePlayOnceAudio (PlayOnceAudio prefab)
 

Detailed Description

Will play the sound effect at different pitches. This is to make sure things don't sound too repetative.

Plays a sound effect at different pitches based on an array of predefined values. This was done instead of having a range for the pitch so that the changes are guaranteed to be different enough to sound pleasing.

Member Function Documentation

◆ PlayClip()

override void PitchShiftAudioSelector.PlayClip ( float  volume)
virtual

Plays the audio clip at a random pitch value.

Parameters
volumeVolume that the clip should be played at.

Implements AudioSelector.

Member Data Documentation

◆ pitchShiftValues

float [] PitchShiftAudioSelector.pitchShiftValues

The discrete values of pitches to choose from when playing the sound effect.

◆ playOnceAudioPrefab

PlayOnceAudio PitchShiftAudioSelector.playOnceAudioPrefab

Base sound effect to play.


The documentation for this class was generated from the following file: