DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PlayItemSoundClient()

void PlayItemSoundClient ( int id)
protected

См. определение в файле ItemSoundHandler.c строка 56

57 {
58 string soundSet = m_AvailableSoundsets.Get(id);
59 if (soundSet == string.Empty)
60 {
61 Debug.Log("Attempting to play soundID " + id + " without defined soundset. Item: " + m_Parent.GetType());
62 return;
63 }
64
65 if (m_PlayingSounds.Get(id)) // already playing
66 return;
67
68 EffectSound sound;
69 SoundParameters params = m_SoundParamsMap.Get(id);
70 if (params)
71 sound = SEffectManager.PlaySoundCachedParams(soundSet, m_Parent.GetPosition(), params.m_FadeIn, params.m_FadeOut, params.m_Loop);
72 else
73 sound = SEffectManager.PlaySound(soundSet, m_Parent.GetPosition());
74
75 if (sound)
76 sound.SetAutodestroy(true);
77 else
78 Debug.Log("Null when creating sound from set: " + soundSet + " Item: " + m_Parent.GetType() );
79
80 m_PlayingSounds.Insert(id, sound);
81 }
Empty
Определения Hand_States.c:14
ref map< int, string > m_AvailableSoundsets
Определения ItemSoundHandler.c:28
ref map< int, ref EffectSound > m_PlayingSounds
Определения ItemSoundHandler.c:27
ref map< int, ref SoundParameters > m_SoundParamsMap
Определения ItemSoundHandler.c:29
Widget m_Parent
Определения SizeToChild.c:92
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Определения Debug.c:122
Определения Debug.c:2
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:603
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
static EffectSound PlaySoundCachedParams(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, using or creating cached SoundParams.
Определения EffectManager.c:207
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Определения EffectManager.c:169
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
bool m_Loop
Определения ItemSoundHandler.c:5
float m_FadeIn
Определения ItemSoundHandler.c:3
float m_FadeOut
Определения ItemSoundHandler.c:4

Перекрестные ссылки Empty, Debug::Log(), m_AvailableSoundsets, SoundParameters::m_FadeIn, SoundParameters::m_FadeOut, SoundParameters::m_Loop, m_Parent, m_PlayingSounds, m_SoundParamsMap, SEffectManager::PlaySound(), SEffectManager::PlaySoundCachedParams() и EffectSound::SetAutodestroy().