C# Class Sol.SoundManager

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: Stumpstump/RoverGame

Méthodes publiques

Свойство Type Description
collections List
effectsGroup UnityEngine.Audio.AudioMixerGroup
masterMixer UnityEngine.Audio.AudioMixer
musicGroup UnityEngine.Audio.AudioMixerGroup
soundSourcePrefab SoundSource
sources List
voicesGroup UnityEngine.Audio.AudioMixerGroup

Méthodes publiques

Méthode Description
Find ( AudioClip audioClip ) : Sound

Return sound of given audio clip

Find ( int soundId ) : Sound

Return sound of given ID

Find ( string soundName ) : Sound

Return sound of given sound name

IsPlaying ( Sound sound ) : bool

Return whether or not sound source of given sound is playing

Play ( AudioClip audioClip, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource

Play sound source of given audio clip

Play ( Sound sound, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource

Play sound source of given sound

Play ( int soundId, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource

Play sound source of given ID

Play ( string soundName, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource

Play sound source of given sound name

Reset ( ) : void

clear out sound sources from the obect pool

Stop ( Sound sound ) : void

Stop playing sound of given sound

Stop ( SoundSource soundSource ) : void

Stop sound of given sound source

Stop ( int soundId ) : void

Stop sound of given ID

Private Methods

Méthode Description
GetSoundSource ( Sound sound, Transform parent, Vector3 position ) : SoundSource

Get sound source from collections

Initialize ( Sound sound, float fadeTime ) : void

Initialize sound

OnSoundSourceStop ( SoundSource source ) : void

Cleanup sound source

Method Details

Find() public méthode

Return sound of given audio clip
public Find ( AudioClip audioClip ) : Sound
audioClip UnityEngine.AudioClip
Résultat Sound

Find() public méthode

Return sound of given ID
public Find ( int soundId ) : Sound
soundId int
Résultat Sound

Find() public méthode

Return sound of given sound name
public Find ( string soundName ) : Sound
soundName string
Résultat Sound

IsPlaying() public méthode

Return whether or not sound source of given sound is playing
public IsPlaying ( Sound sound ) : bool
sound Sound
Résultat bool

Play() public méthode

Play sound source of given audio clip
public Play ( AudioClip audioClip, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource
audioClip UnityEngine.AudioClip
fadeTime float
parent UnityEngine.Transform
position UnityEngine.Vector3
Résultat SoundSource

Play() public méthode

Play sound source of given sound
public Play ( Sound sound, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource
sound Sound
fadeTime float
parent UnityEngine.Transform
position UnityEngine.Vector3
Résultat SoundSource

Play() public méthode

Play sound source of given ID
public Play ( int soundId, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource
soundId int
fadeTime float
parent UnityEngine.Transform
position UnityEngine.Vector3
Résultat SoundSource

Play() public méthode

Play sound source of given sound name
public Play ( string soundName, float fadeTime = 0f, Transform parent = null, Vector3 position = default(Vector3) ) : SoundSource
soundName string
fadeTime float
parent UnityEngine.Transform
position UnityEngine.Vector3
Résultat SoundSource

Reset() public méthode

clear out sound sources from the obect pool
public Reset ( ) : void
Résultat void

Stop() public méthode

Stop playing sound of given sound
public Stop ( Sound sound ) : void
sound Sound
Résultat void

Stop() public méthode

Stop sound of given sound source
public Stop ( SoundSource soundSource ) : void
soundSource SoundSource
Résultat void

Stop() public méthode

Stop sound of given ID
public Stop ( int soundId ) : void
soundId int
Résultat void

Property Details

collections public_oe property

public List collections
Résultat List

effectsGroup public_oe property

public AudioMixerGroup,UnityEngine.Audio effectsGroup
Résultat UnityEngine.Audio.AudioMixerGroup

masterMixer public_oe property

public AudioMixer,UnityEngine.Audio masterMixer
Résultat UnityEngine.Audio.AudioMixer

musicGroup public_oe property

public AudioMixerGroup,UnityEngine.Audio musicGroup
Résultat UnityEngine.Audio.AudioMixerGroup

soundSourcePrefab public_oe property

public SoundSource,Sol soundSourcePrefab
Résultat SoundSource

sources public_oe property

public List sources
Résultat List

voicesGroup public_oe property

public AudioMixerGroup,UnityEngine.Audio voicesGroup
Résultat UnityEngine.Audio.AudioMixerGroup