DayZ 1.30
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 строка 217

218 {
219 Mission mission = g_Game.GetMission();
220 switch (eventTypeId)
221 {
223 {
224 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
225 if (m_VoNToggled)
226 {
228 {
229 ShowVoiceNotification(g_Game.GetVoiceLevel(), false);
230 }
231 }
232 break;
233 }
234
236 {
237 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
238 if (m_VoNToggled)
239 {
241 {
243 }
244 }
245 break;
246 }
247
249 {
250 if (!mission)
251 {
252 break;
253 }
254
255 VONStateEventParams vonStateParams = VONStateEventParams.Cast( params );
256 mission.SetVoNActive(vonStateParams.param1);
257 m_VoNToggled = vonStateParams.param2;
258
260
261 m_OnVonStateEvent.Invoke();
262 break;
263 }
264
266 {
268 break;
269 }
270
272 {
273 VONStartSpeakingEventParams vonStartParams;
274 if (Class.CastTo(vonStartParams, params))
275 {
276 GetDayZGame().AddVoiceNotification(vonStartParams);
277 }
278 break;
279 }
280
282 {
283 VONStopSpeakingEventParams vonStopParams;
284 if (Class.CastTo(vonStopParams, params))
285 {
286 GetDayZGame().RemoveVoiceNotification(vonStopParams);
287 }
288 break;
289 }
290
292 {
294 break;
295 }
296 }
297 }
DayZGame g_Game
Определения DayZGame.c:4074
DayZGame GetDayZGame()
Определения DayZGame.c:4076
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:61
void UpdateVoiceIcon()
Определения VONManager.c:175
Super root of all classes in Enforce script.
Определения EnScript.c:11
Mission class.
Определения gameplay.c:686
static bool IsVoiceThresholdMinimum()
Specifies whether user's voice activation threshold value is equal to the minimum voice activation th...
Определения VONManager.c:345
Manager class which handles Voice-over-network functionality while player is connected to a server.
Определения VONManager.c:302
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
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

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