DayZ 1.29
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 строка 214

215 {
216 Mission mission = g_Game.GetMission();
217 switch (eventTypeId)
218 {
220 {
221 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
222 if (m_VoNToggled)
223 {
225 {
226 ShowVoiceNotification(g_Game.GetVoiceLevel(), false);
227 }
228 }
229 break;
230 }
231
233 {
234 // only handle this if we are in Voice Activation mode, so ignore if in PTT mode
235 if (m_VoNToggled)
236 {
238 {
240 }
241 }
242 break;
243 }
244
246 {
247 if (!mission)
248 {
249 break;
250 }
251
252 VONStateEventParams vonStateParams = VONStateEventParams.Cast( params );
253 mission.SetVoNActive(vonStateParams.param1);
254 m_VoNToggled = vonStateParams.param2;
255
257
258 m_OnVonStateEvent.Invoke();
259 break;
260 }
261
263 {
265 break;
266 }
267
269 {
270 VONStartSpeakingEventParams vonStartParams;
271 if (Class.CastTo(vonStartParams, params))
272 {
273 GetDayZGame().AddVoiceNotification(vonStartParams);
274 }
275 break;
276 }
277
279 {
280 VONStopSpeakingEventParams vonStopParams;
281 if (Class.CastTo(vonStopParams, params))
282 {
283 GetDayZGame().RemoveVoiceNotification(vonStopParams);
284 }
285 break;
286 }
287
289 {
291 break;
292 }
293 }
294 }
DayZGame g_Game
Определения DayZGame.c:3942
DayZGame GetDayZGame()
Определения DayZGame.c:3944
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:172
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:342
Manager class which handles Voice-over-network functionality while player is connected to a server.
Определения VONManager.c:299
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.