Highroad Engine v1.3
Public Member Functions | Public Attributes | Protected Attributes | List of all members
MoreMountains.HighroadEngine.SoundManager Class Reference

This persistent singleton handles sound playing More...

Inheritance diagram for MoreMountains.HighroadEngine.SoundManager:

Public Member Functions

virtual void PlayBackgroundMusic (AudioSource Music)
 Plays a background music. Only one background music can be active at a time. More...
 
virtual void StopBackGroundMusic ()
 Stops the background music. More...
 
virtual AudioSource PlaySound (AudioClip sfx, Vector3 location, bool shouldDestroyAfterPlay=true)
 Plays a sound More...
 
virtual AudioSource PlayLoop (AudioClip Sfx, Vector3 Location)
 Plays a sound More...
 

Public Attributes

bool MusicOn =true
 true if the music is enabled
More...
 
bool SfxOn =true
 true if the sound fx are enabled More...
 
float MusicVolume =0.3f
 the music volume More...
 
float SfxVolume =1f
 the sound fx volume More...
 

Protected Attributes

AudioSource _backgroundMusic
 

Detailed Description

This persistent singleton handles sound playing

Member Function Documentation

◆ PlayBackgroundMusic()

virtual void MoreMountains.HighroadEngine.SoundManager.PlayBackgroundMusic ( AudioSource  Music)
virtual

Plays a background music. Only one background music can be active at a time.

Parameters
ClipYour audio clip.

◆ PlayLoop()

virtual AudioSource MoreMountains.HighroadEngine.SoundManager.PlayLoop ( AudioClip  Sfx,
Vector3  Location 
)
virtual

Plays a sound

Returns
An audiosource
Parameters
SfxThe sound clip you want to play.
LocationThe location of the sound.
VolumeThe volume of the sound.

◆ PlaySound()

virtual AudioSource MoreMountains.HighroadEngine.SoundManager.PlaySound ( AudioClip  sfx,
Vector3  location,
bool  shouldDestroyAfterPlay = true 
)
virtual

Plays a sound

Returns
An audiosource
Parameters
SfxThe sound clip you want to play.
LocationThe location of the sound.
VolumeThe volume of the sound.

◆ StopBackGroundMusic()

virtual void MoreMountains.HighroadEngine.SoundManager.StopBackGroundMusic ( )
virtual

Stops the background music.

Member Data Documentation

◆ _backgroundMusic

AudioSource MoreMountains.HighroadEngine.SoundManager._backgroundMusic
protected

◆ MusicOn

bool MoreMountains.HighroadEngine.SoundManager.MusicOn =true

true if the music is enabled

◆ MusicVolume

float MoreMountains.HighroadEngine.SoundManager.MusicVolume =0.3f

the music volume

◆ SfxOn

bool MoreMountains.HighroadEngine.SoundManager.SfxOn =true

true if the sound fx are enabled

◆ SfxVolume

float MoreMountains.HighroadEngine.SoundManager.SfxVolume =1f

the sound fx volume


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