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

◆ SoundPlayEx()

bool EffectSound::SoundPlayEx ( out SoundParams params)
inlineprotected

Plays sound.

Аргументы
paramsSoundParams Sound Parameters for the sound
Возвращает
bool Whether the sound will start playing

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

153 {
154 super.Start();
155
156 if (m_SoundSetName != "")
157 {
158 vector position = GetCurrentLocalPosition();
159
160 if ( SoundLoadEx(params) )
161 {
163 {
164 m_SoundObjectBuilder.AddEnvSoundVariables(GetPosition());
165 m_SoundObject = m_SoundObjectBuilder.BuildSoundObject();
167 m_SoundObject.SetParent( m_ParentObject );
168 }
169
170 if ( m_SoundObject )
171 {
172 SetCurrentLocalPosition(position, false);
174 if ( !m_SoundWaveObject )
175 return false;
176
177 // Wait for header to be loaded before asking for its length, else we block the main thread
178 if (m_SoundWaveObject.IsHeaderLoaded())
180 else
181 m_SoundWaveObject.GetEvents().Event_OnSoundWaveHeaderLoaded.Insert(ValidateSoundWave);
182
183 return true;
184 }
185 else
186 {
187 SoundError("m_SoundObject is null.");
188 }
189 }
190 }
191
192 return false;
193 }
Object m_ParentObject
Cached parent.
Определения Effect.c:39
proto native AbstractSoundScene GetSoundScene()
bool SoundLoadEx(out SoundParams params)
Loads in the sound when it is requested for playing through 'SoundPlayEx'.
Определения EffectSound.c:300
override void SetCurrentLocalPosition(vector pos, bool updateCached=true)
Set the current local position of the managed sound.
Определения EffectSound.c:729
override vector GetCurrentLocalPosition()
Get the current local position of the managed sound.
Определения EffectSound.c:743
ref SoundParams m_SoundParams
Определения EffectSound.c:20
bool m_SetEnvVariables
Определения EffectSound.c:33
string m_SoundSetName
Определения EffectSound.c:31
void SoundError(string err_msg)
Helper for throwing sound errors.
Определения EffectSound.c:917
AbstractWave m_SoundWaveObject
Определения EffectSound.c:23
WaveKind m_SoundWaveKind
Определения EffectSound.c:30
void ValidateSoundWave()
Gets called to fill in the necessary data when the header has finished loading.
Определения EffectSound.c:365
ref SoundObjectBuilder m_SoundObjectBuilder
Определения EffectSound.c:21
ref SoundObject m_SoundObject
Определения EffectSound.c:22
proto native CGame GetGame()
proto native AbstractWave Play3D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки GetCurrentLocalPosition(), GetGame(), GetPosition, CGame::GetSoundScene(), m_ParentObject, m_SetEnvVariables, m_SoundObject, m_SoundObjectBuilder, m_SoundParams, m_SoundSetName, m_SoundWaveKind, m_SoundWaveObject, AbstractSoundScene::Play3D(), SetCurrentLocalPosition(), SoundError(), SoundLoadEx(), SoundParams() и ValidateSoundWave().

Используется в SEffectManager::PlaySoundCachedParams(), SEffectManager::PlaySoundParams() и SoundPlay().