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

◆ PlayItemSoundClient()

void PlayItemSoundClient ( int id,
int slotId = InventorySlots.INVALID )
protected

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

57 {
58 InventoryItemType itemType = m_Parent.GetInventoryItemType();
59
60 string soundSet = GetSoundSetForEvent(id, slotId);
61 if (soundSet == string.Empty)
62 {
63 Debug.Log("No soundset defined for sound event id " + typename.EnumToString(SoundConstants, id) + ". Item: " + m_Parent.GetType() + " | Slot ID: " + slotId);
64 return;
65 }
66
67 if (m_PlayingSounds.Get(id)) // already playing
68 return;
69
70 EffectSound sound;
71 SoundParameters params = m_SoundParamsMap.Get(id);
72 vector position = m_Parent.GetPosition();
73
74 if (params)
75 sound = SEffectManager.PlaySoundCachedParams(soundSet, position, params.m_FadeIn, params.m_FadeOut, params.m_Loop);
76 else
77 sound = SEffectManager.PlaySound(soundSet, position);
78
79 if (sound)
80 sound.SetAutodestroy(true);
81 else
82 Debug.Log("Null when creating sound from set: " + soundSet + " Item: " + m_Parent.GetType() );
83
84 m_PlayingSounds.Insert(id, sound);
85 }
void InventoryItemType()
Entity m_Parent
Определения CachedEquipmentStorageBase.c:15
Empty
Определения Hand_States.c:14
string GetSoundSetForEvent(int id, int slotId=InventorySlots.INVALID)
Определения ItemSoundHandler.c:87
ref map< int, ref EffectSound > m_PlayingSounds
Определения ItemSoundHandler.c:27
ref map< int, ref SoundParameters > m_SoundParamsMap
Определения ItemSoundHandler.c:29
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.
Определения 3_Game/DayZ/tools/Debug.c:182
Определения 3_Game/DayZ/tools/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
Определения EnConvert.c:119

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