C# Класс Sol.SoundManager

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
collections List
effectsGroup UnityEngine.Audio.AudioMixerGroup
masterMixer UnityEngine.Audio.AudioMixer
musicGroup UnityEngine.Audio.AudioMixerGroup
soundSourcePrefab SoundSource
sources List
voicesGroup UnityEngine.Audio.AudioMixerGroup

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Find() публичный Метод

Return sound of given audio clip
public Find ( AudioClip audioClip ) : Sound
audioClip UnityEngine.AudioClip
Результат Sound

Find() публичный Метод

Return sound of given ID
public Find ( int soundId ) : Sound
soundId int
Результат Sound

Find() публичный Метод

Return sound of given sound name
public Find ( string soundName ) : Sound
soundName string
Результат Sound

IsPlaying() публичный Метод

Return whether or not sound source of given sound is playing
public IsPlaying ( Sound sound ) : bool
sound Sound
Результат bool

Play() публичный Метод

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
Результат SoundSource

Play() публичный Метод

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
Результат SoundSource

Play() публичный Метод

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
Результат SoundSource

Play() публичный Метод

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
Результат SoundSource

Reset() публичный Метод

clear out sound sources from the obect pool
public Reset ( ) : void
Результат void

Stop() публичный Метод

Stop playing sound of given sound
public Stop ( Sound sound ) : void
sound Sound
Результат void

Stop() публичный Метод

Stop sound of given sound source
public Stop ( SoundSource soundSource ) : void
soundSource SoundSource
Результат void

Stop() публичный Метод

Stop sound of given ID
public Stop ( int soundId ) : void
soundId int
Результат void

Описание свойств

collections публичное свойство

public List collections
Результат List

effectsGroup публичное свойство

public AudioMixerGroup,UnityEngine.Audio effectsGroup
Результат UnityEngine.Audio.AudioMixerGroup

masterMixer публичное свойство

public AudioMixer,UnityEngine.Audio masterMixer
Результат UnityEngine.Audio.AudioMixer

musicGroup публичное свойство

public AudioMixerGroup,UnityEngine.Audio musicGroup
Результат UnityEngine.Audio.AudioMixerGroup

soundSourcePrefab публичное свойство

public SoundSource,Sol soundSourcePrefab
Результат SoundSource

sources публичное свойство

public List sources
Результат List

voicesGroup публичное свойство

public AudioMixerGroup,UnityEngine.Audio voicesGroup
Результат UnityEngine.Audio.AudioMixerGroup