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

◆ OnEvent()

void VONManagerImplementation::OnEvent ( EventType eventTypeId,
Param params )
protected

Handles VON-related events.

Аргументы
eventTypeIdevent that fired
paramsevent-specific parameters

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

201 {
203 switch (eventTypeId)
204 {
206 {
207 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
208 if (m_VoNToggled)
209 {
211 {
212 ShowVoiceNotification(GetGame().GetVoiceLevel(), false);
213 }
214 }
215 break;
216 }
217
219 {
220 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
221 if (m_VoNToggled)
222 {
224 {
226 }
227 }
228 break;
229 }
230
232 {
233 if (!mission)
234 {
235 break;
236 }
237
238 VONStateEventParams vonStateParams = VONStateEventParams.Cast( params );
239 mission.SetVoNActive(vonStateParams.param1);
240 m_VoNToggled = vonStateParams.param2;
241
243
244 m_OnVonStateEvent.Invoke();
245 break;
246 }
247
249 {
251 break;
252 }
253
255 {
256 VONStartSpeakingEventParams vonStartParams;
257 if (Class.CastTo(vonStartParams, params))
258 {
259 GetDayZGame().AddVoiceNotification(vonStartParams);
260 }
261 break;
262 }
263
265 {
266 VONStopSpeakingEventParams vonStopParams;
267 if (Class.CastTo(vonStopParams, params))
268 {
269 GetDayZGame().RemoveVoiceNotification(vonStopParams);
270 }
271 break;
272 }
273
275 {
277 break;
278 }
279 }
280 }
DayZGame GetDayZGame()
Определения DayZGame.c:3870
Mission mission
Определения DisplayStatus.c:28
bool m_VoNToggled
Определения VONManager.c:27
ref ScriptInvoker m_OnPartyChatChangedEvent
Определения VONManager.c:29
void HideVoiceNotification()
Hides the VON notification completely and immediately.
Определения VONManager.c:41
ref ScriptInvoker m_OnVonStateEvent
Определения VONManager.c:28
void ShowVoiceNotification(int level, bool fading)
Shows the voice notification.
Определения VONManager.c:58
void UpdateVoiceIcon()
Определения VONManager.c:158
proto native Mission GetMission()
Super root of all classes in Enforce script.
Определения EnScript.c:11
Mission class.
Определения gameplay.c:687
static bool IsVoiceThresholdMinimum()
Specifies whether user's voice activation threshold value is equal to the minimum voice activation th...
Определения VONManager.c:328
Manager class which handles Voice-over-network functionality while player is connected to a server.
Определения VONManager.c:285
Param2< string, string > VONStartSpeakingEventParams
player name, player id
Определения gameplay.c:449
const EventType PartyChatStatusChangedEventTypeID
no params
Определения gameplay.c:561
Param2< bool, bool > VONStateEventParams
listening, toggled
Определения gameplay.c:447
Param2< string, string > VONStopSpeakingEventParams
player name, player id
Определения gameplay.c:451
const EventType VONStartSpeakingEventTypeID
params: VONStartSpeakingEventParams
Определения gameplay.c:551
const EventType VONStateEventTypeID
params: VONStateEventParams
Определения gameplay.c:549
const EventType VONUserStoppedTransmittingAudioEventTypeID
no params
Определения gameplay.c:557
const EventType VONUserStartedTransmittingAudioEventTypeID
no params
Определения gameplay.c:555
const EventType VONStopSpeakingEventTypeID
params: VONStopSpeakingEventParams
Определения gameplay.c:553
const EventType MPSessionPlayerReadyEventTypeID
no params
Определения gameplay.c:481
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), GetDayZGame(), GetGame(), CGame::GetMission(), VONManagerBase::HideVoiceNotification(), VONManager::IsVoiceThresholdMinimum(), m_OnPartyChatChangedEvent, m_OnVonStateEvent, m_VoNToggled, mission, MPSessionPlayerReadyEventTypeID, PartyChatStatusChangedEventTypeID, VONManagerBase::ShowVoiceNotification(), UpdateVoiceIcon(), VONStartSpeakingEventTypeID, VONStateEventTypeID, VONStopSpeakingEventTypeID, VONUserStartedTransmittingAudioEventTypeID и VONUserStoppedTransmittingAudioEventTypeID.