TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_AudioSource Class Reference
Inheritance diagram for MoreMountains.Feedbacks.MMF_AudioSource:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  Modes { Play , Pause , UnPause , Stop }
 the possible ways to interact with the audiosource More...

Public Member Functions

override void Stop (Vector3 position, float feedbacksIntensity=1.0f)
 Stops the audiosource from playing.

Public Attributes

AudioSource TargetAudioSource
 the target audio source to play
Modes Mode = Modes.Play
 whether we should play the audio source or stop it or pause it
AudioClip[] RandomSfx
 an array to pick a random sfx from
float MinVolume = 1f
 the minimum volume to play the sound at
float MaxVolume = 1f
 the maximum volume to play the sound at
float MinPitch = 1f
 the minimum pitch to play the sound at
float MaxPitch = 1f
 the maximum pitch to play the sound at
AudioMixerGroup SfxAudioMixerGroup
 the audiomixer to play the sound with (optional)

Static Public Attributes

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

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target)
override void CustomInitialization (MMF_Player owner)
 This method describes all custom initialization processes the feedback requires, in addition to the main Initialization method.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 Plays either a random sound or the specified sfx.
virtual void PlayAudioSource (AudioSource audioSource, float volume, float pitch)
 Plays the audiosource at the selected volume and pitch.

Protected Attributes

AudioClip _randomClip
float _duration

Properties

override bool HasRandomness [get]
 sets the inspector color for this feedback
override bool HasAutomatedTargetAcquisition [get]
override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the clip being played

Member Enumeration Documentation

◆ Modes

the possible ways to interact with the audiosource

Enumerator
Play 
Pause 
UnPause 
Stop 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_AudioSource.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_AudioSource.CustomInitialization ( MMF_Player owner)
protectedvirtual

This method describes all custom initialization processes the feedback requires, in addition to the main Initialization method.

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_AudioSource.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

Plays either a random sound or the specified sfx.

Parameters
position
feedbacksIntensity

◆ PlayAudioSource()

virtual void MoreMountains.Feedbacks.MMF_AudioSource.PlayAudioSource ( AudioSource audioSource,
float volume,
float pitch )
protectedvirtual

Plays the audiosource at the selected volume and pitch.

Parameters
audioSource
volume
pitch

◆ Stop()

override void MoreMountains.Feedbacks.MMF_AudioSource.Stop ( Vector3 position,
float feedbacksIntensity = 1::0f )
virtual

Stops the audiosource from playing.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _duration

float MoreMountains.Feedbacks.MMF_AudioSource._duration
protected

◆ _randomClip

AudioClip MoreMountains.Feedbacks.MMF_AudioSource._randomClip
protected

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_AudioSource.FeedbackTypeAuthorized = true
static

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

◆ MaxPitch

float MoreMountains.Feedbacks.MMF_AudioSource.MaxPitch = 1f

the maximum pitch to play the sound at

◆ MaxVolume

float MoreMountains.Feedbacks.MMF_AudioSource.MaxVolume = 1f

the maximum volume to play the sound at

◆ MinPitch

float MoreMountains.Feedbacks.MMF_AudioSource.MinPitch = 1f

the minimum pitch to play the sound at

◆ MinVolume

float MoreMountains.Feedbacks.MMF_AudioSource.MinVolume = 1f

the minimum volume to play the sound at

◆ Mode

Modes MoreMountains.Feedbacks.MMF_AudioSource.Mode = Modes.Play

whether we should play the audio source or stop it or pause it

◆ RandomSfx

AudioClip [] MoreMountains.Feedbacks.MMF_AudioSource.RandomSfx

an array to pick a random sfx from

◆ SfxAudioMixerGroup

AudioMixerGroup MoreMountains.Feedbacks.MMF_AudioSource.SfxAudioMixerGroup

the audiomixer to play the sound with (optional)

◆ TargetAudioSource

AudioSource MoreMountains.Feedbacks.MMF_AudioSource.TargetAudioSource

the target audio source to play

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_AudioSource.FeedbackDuration
getset

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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_AudioSource.HasAutomatedTargetAcquisition
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_AudioSource.HasRandomness
get

sets the inspector color for this feedback


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacks/Feedbacks/MMF_AudioSource.cs