DoopelPonger
Public Member Functions | Public Attributes | List of all members
BackgroundMusic Class Reference
Inheritance diagram for BackgroundMusic:
Inheritance graph
[legend]
Collaboration diagram for BackgroundMusic:
Collaboration graph
[legend]

Public Member Functions

void Awake ()
 Initialize the AudioSource amd makes sure it is looping. More...
 
void SetPitch (float pitch)
 Sets the pitch of the audio source. Setting the pitch below 1 lowers the pitch to simulate the music playing slow motion. More...
 
void SetVolume (float volume)
 Master volume control for the background music. More...
 
void Play ()
 
void Stop ()
 
string GetObjectPoolerKey ()
 
- Public Member Functions inherited from CoopObjectPooler.IObjectPoolerItem
string GetObjectPoolerKey ()
 

Public Attributes

string poolKey
 
AudioSource audioSourcePrefab
 

Member Function Documentation

◆ Awake()

void BackgroundMusic.Awake ( )

Initialize the AudioSource amd makes sure it is looping.

◆ GetObjectPoolerKey()

string BackgroundMusic.GetObjectPoolerKey ( )

◆ Play()

void BackgroundMusic.Play ( )

/brief Plays the audioSource.

◆ SetPitch()

void BackgroundMusic.SetPitch ( float  pitch)

Sets the pitch of the audio source. Setting the pitch below 1 lowers the pitch to simulate the music playing slow motion.

◆ SetVolume()

void BackgroundMusic.SetVolume ( float  volume)

Master volume control for the background music.

Parameters
volumeNew volume for sound effects. Clamped between 0 and 1

◆ Stop()

void BackgroundMusic.Stop ( )

/brief Stops the audioSource.

Member Data Documentation

◆ audioSourcePrefab

AudioSource BackgroundMusic.audioSourcePrefab

◆ poolKey

string BackgroundMusic.poolKey

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