Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.Feedbacks.MMF_MMSoundManagerSound Class Reference

This feedback will let you play a sound via the MMSoundManager. You will need a game object in your scene with a MMSoundManager object on it for this to work. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_MMSoundManagerSound:
MoreMountains.Feedbacks.MMF_Feedback

Public Member Functions

override void InitializeCustomAttributes ()
 Use this method to initialize any custom attributes you may have More...
 

Public Attributes

AudioClip Sfx
 the sound clip to play More...
 
AudioClip[] RandomSfx
 an array to pick a random sfx from More...
 
MMF_Button TestPlayButton
 a test button used to play the sound in inspector More...
 
MMF_Button TestStopButton
 a test button used to stop the sound in inspector More...
 
float MinVolume = 1f
 the minimum volume to play the sound at More...
 
float MaxVolume = 1f
 the maximum volume to play the sound at More...
 
float MinPitch = 1f
 the minimum pitch to play the sound at More...
 
float MaxPitch = 1f
 the maximum pitch to play the sound at More...
 
Vector2 PlaybackTime = new Vector2(0f, 0f)
 the minimum and maximum time stamps at which to play the sound More...
 
MMSoundManager.MMSoundManagerTracks MmSoundManagerTrack = MMSoundManager.MMSoundManagerTracks.Sfx
 the track on which to play the sound. Pick the one that matches the nature of your sound More...
 
int ID = 0
 the ID of the sound. This is useful if you plan on using sound control feedbacks on it afterwards. More...
 
AudioMixerGroup AudioGroup = null
 the AudioGroup on which to play the sound. If you're already targeting a preset track, you can leave it blank, otherwise the group you specify here will override it. More...
 
AudioSource RecycleAudioSource = null
 if (for some reason) you've already got an audiosource and wouldn't like to use the built-in pool system, you can specify it here More...
 
bool Loop = false
 whether or not this sound should loop More...
 
bool Persistent = false
 whether or not this sound should continue playing when transitioning to another scene More...
 
bool DoNotPlayIfClipAlreadyPlaying = false
 whether or not this sound should play if the same sound clip is already playing More...
 
bool StopSoundOnFeedbackStop = false
 if this is true, this sound will stop playing when stopping the feedback More...
 
bool Fade = false
 whether or not to fade this sound in when playing it More...
 
float FadeInitialVolume = 0f
 if fading, the volume at which to start the fade More...
 
float FadeDuration = 1f
 if fading, the duration of the fade, in seconds More...
 
MMTweenType FadeTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic)
 if fading, the tween over which to fade the sound More...
 
bool SoloSingleTrack = false
 whether or not this sound should play in solo mode over its destination track. If yes, all other sounds on that track will be muted when this sound starts playing More...
 
bool SoloAllTracks = false
 whether or not this sound should play in solo mode over all other tracks. If yes, all other tracks will be muted when this sound starts playing More...
 
bool AutoUnSoloOnEnd = false
 if in any of the above solo modes, AutoUnSoloOnEnd will unmute the track(s) automatically once that sound stops playing More...
 
float PanStereo
 Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo. More...
 
float SpatialBlend
 Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D. More...
 
bool BypassEffects = false
 Bypass effects (Applied from filter components or global listener filters). More...
 
bool BypassListenerEffects = false
 When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group. More...
 
bool BypassReverbZones = false
 When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones. More...
 
int Priority = 128
 Sets the priority of the AudioSource. More...
 
float ReverbZoneMix = 1f
 The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones. More...
 
float DopplerLevel = 1f
 Sets the Doppler scale for this AudioSource. More...
 
int Spread = 0
 Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space. More...
 
AudioRolloffMode RolloffMode = AudioRolloffMode.Logarithmic
 Sets/Gets how the AudioSource attenuates over distance. More...
 
float MinDistance = 1f
 Within the Min distance the AudioSource will cease to grow louder in volume. More...
 
float MaxDistance = 500f
 (Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at. More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 Plays either a random sound or the specified sfx More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 On Stop, we stop our sound if needed More...
 
virtual void PlaySound (AudioClip sfx, Vector3 position, float intensity)
 Triggers a play sound event More...
 
virtual float GetDuration ()
 Returns the duration of the sound, or of the longest of the random sounds More...
 
virtual async void TestPlaySound ()
 A test method that creates an audiosource, plays it, and destroys itself after play More...
 
virtual void TestStopSound ()
 A test method that stops the test sound More...
 
virtual void PlayAudioSource (AudioSource audioSource, AudioClip sfx, float volume, float pitch, float time)
 Plays the audio source with the specified volume and pitch More...
 

Protected Attributes

AudioClip _randomClip
 
AudioSource _editorAudioSource
 
MMSoundManagerPlayOptions _options
 
AudioSource _playedAudioSource
 
float _randomPlaybackTime
 

Properties

override float FeedbackDuration [get]
 sets the inspector color for this feedback More...
 

Detailed Description

This feedback will let you play a sound via the MMSoundManager. You will need a game object in your scene with a MMSoundManager object on it for this to work.

Member Function Documentation

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

Plays either a random sound or the specified sfx

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

On Stop, we stop our sound if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GetDuration()

virtual float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.GetDuration ( )
protectedvirtual

Returns the duration of the sound, or of the longest of the random sounds

Returns

◆ InitializeCustomAttributes()

override void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.InitializeCustomAttributes ( )
virtual

Use this method to initialize any custom attributes you may have

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ PlayAudioSource()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.PlayAudioSource ( AudioSource  audioSource,
AudioClip  sfx,
float  volume,
float  pitch,
float  time 
)
protectedvirtual

Plays the audio source with the specified volume and pitch

Parameters
audioSource
sfx
volume
pitch

◆ PlaySound()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.PlaySound ( AudioClip  sfx,
Vector3  position,
float  intensity 
)
protectedvirtual

Triggers a play sound event

Parameters
sfx
position
intensity

◆ TestPlaySound()

virtual async void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.TestPlaySound ( )
protectedvirtual

A test method that creates an audiosource, plays it, and destroys itself after play

◆ TestStopSound()

virtual void MoreMountains.Feedbacks.MMF_MMSoundManagerSound.TestStopSound ( )
protectedvirtual

A test method that stops the test sound

Member Data Documentation

◆ _editorAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSound._editorAudioSource
protected

◆ _options

MMSoundManagerPlayOptions MoreMountains.Feedbacks.MMF_MMSoundManagerSound._options
protected

◆ _playedAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSound._playedAudioSource
protected

◆ _randomClip

AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSound._randomClip
protected

◆ _randomPlaybackTime

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound._randomPlaybackTime
protected

◆ AudioGroup

AudioMixerGroup MoreMountains.Feedbacks.MMF_MMSoundManagerSound.AudioGroup = null

the AudioGroup on which to play the sound. If you're already targeting a preset track, you can leave it blank, otherwise the group you specify here will override it.

◆ AutoUnSoloOnEnd

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.AutoUnSoloOnEnd = false

if in any of the above solo modes, AutoUnSoloOnEnd will unmute the track(s) automatically once that sound stops playing

◆ BypassEffects

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.BypassEffects = false

Bypass effects (Applied from filter components or global listener filters).

◆ BypassListenerEffects

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.BypassListenerEffects = false

When set global effects on the AudioListener will not be applied to the audio signal generated by the AudioSource. Does not apply if the AudioSource is playing into a mixer group.

◆ BypassReverbZones

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.BypassReverbZones = false

When set doesn't route the signal from an AudioSource into the global reverb associated with reverb zones.

◆ DoNotPlayIfClipAlreadyPlaying

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.DoNotPlayIfClipAlreadyPlaying = false

whether or not this sound should play if the same sound clip is already playing

◆ DopplerLevel

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.DopplerLevel = 1f

Sets the Doppler scale for this AudioSource.

◆ Fade

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Fade = false

whether or not to fade this sound in when playing it

◆ FadeDuration

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.FadeDuration = 1f

if fading, the duration of the fade, in seconds

◆ FadeInitialVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.FadeInitialVolume = 0f

if fading, the volume at which to start the fade

◆ FadeTween

MMTweenType MoreMountains.Feedbacks.MMF_MMSoundManagerSound.FadeTween = new MMTweenType(MMTween.MMTweenCurve.EaseInOutQuartic)

if fading, the tween over which to fade the sound

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ ID

int MoreMountains.Feedbacks.MMF_MMSoundManagerSound.ID = 0

the ID of the sound. This is useful if you plan on using sound control feedbacks on it afterwards.

◆ Loop

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Loop = false

whether or not this sound should loop

◆ MaxDistance

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MaxDistance = 500f

(Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.

◆ MaxPitch

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MaxPitch = 1f

the maximum pitch to play the sound at

◆ MaxVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MaxVolume = 1f

the maximum volume to play the sound at

◆ MinDistance

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MinDistance = 1f

Within the Min distance the AudioSource will cease to grow louder in volume.

◆ MinPitch

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MinPitch = 1f

the minimum pitch to play the sound at

◆ MinVolume

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MinVolume = 1f

the minimum volume to play the sound at

◆ MmSoundManagerTrack

MMSoundManager.MMSoundManagerTracks MoreMountains.Feedbacks.MMF_MMSoundManagerSound.MmSoundManagerTrack = MMSoundManager.MMSoundManagerTracks.Sfx

the track on which to play the sound. Pick the one that matches the nature of your sound

◆ PanStereo

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.PanStereo

Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or Stereo.

◆ Persistent

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Persistent = false

whether or not this sound should continue playing when transitioning to another scene

◆ PlaybackTime

Vector2 MoreMountains.Feedbacks.MMF_MMSoundManagerSound.PlaybackTime = new Vector2(0f, 0f)

the minimum and maximum time stamps at which to play the sound

◆ Priority

int MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Priority = 128

Sets the priority of the AudioSource.

◆ RandomSfx

AudioClip [] MoreMountains.Feedbacks.MMF_MMSoundManagerSound.RandomSfx

an array to pick a random sfx from

◆ RecycleAudioSource

AudioSource MoreMountains.Feedbacks.MMF_MMSoundManagerSound.RecycleAudioSource = null

if (for some reason) you've already got an audiosource and wouldn't like to use the built-in pool system, you can specify it here

◆ ReverbZoneMix

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.ReverbZoneMix = 1f

The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones.

◆ RolloffMode

AudioRolloffMode MoreMountains.Feedbacks.MMF_MMSoundManagerSound.RolloffMode = AudioRolloffMode.Logarithmic

Sets/Gets how the AudioSource attenuates over distance.

◆ Sfx

AudioClip MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Sfx

the sound clip to play

◆ SoloAllTracks

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.SoloAllTracks = false

whether or not this sound should play in solo mode over all other tracks. If yes, all other tracks will be muted when this sound starts playing

◆ SoloSingleTrack

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.SoloSingleTrack = false

whether or not this sound should play in solo mode over its destination track. If yes, all other sounds on that track will be muted when this sound starts playing

◆ SpatialBlend

float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.SpatialBlend

Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D.

◆ Spread

int MoreMountains.Feedbacks.MMF_MMSoundManagerSound.Spread = 0

Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.

◆ StopSoundOnFeedbackStop

bool MoreMountains.Feedbacks.MMF_MMSoundManagerSound.StopSoundOnFeedbackStop = false

if this is true, this sound will stop playing when stopping the feedback

◆ TestPlayButton

MMF_Button MoreMountains.Feedbacks.MMF_MMSoundManagerSound.TestPlayButton

a test button used to play the sound in inspector

◆ TestStopButton

MMF_Button MoreMountains.Feedbacks.MMF_MMSoundManagerSound.TestStopButton

a test button used to stop the sound in inspector

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_MMSoundManagerSound.FeedbackDuration
get

sets the inspector color for this feedback

the duration of this feedback is the duration of the clip being played


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