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

◆ ShowVoiceNotification()

override void ShowVoiceNotification ( int level,
bool fading )
protected

Shows the voice notification.

Аргументы
levelthe loudness of the player voice. 0 = whisper, 1 = normal, 2 = shout
fadingspecifies whether icon should slowly fade to invisibility after being displayed

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

62 {
63 if (g_Game.IsMissionMainMenu())
64 {
65 return;
66 }
67
68 Mission mission = g_Game.GetMission();
69 ImageWidget micIcon = mission.GetMicrophoneIcon();
70 WidgetFadeTimer micTimer = mission.GetMicWidgetFadeTimer();
71 map<int,ImageWidget> voiceLeveWidgets = mission.GetVoiceLevelWidgets();
72 map<int,ref WidgetFadeTimer> voiceLevelTimers = mission.GetVoiceLevelTimers();
73
74 // microphone icon
75 micTimer.Stop();
76 micIcon.SetAlpha(1.0);
77 micIcon.Show(true);
78
79 if (fading)
80 {
81 micTimer.FadeOut(micIcon, 3.0);
82 }
83
84 // range icons
85 for( int n = 0; n < voiceLeveWidgets.Count(); n++ )
86 {
87 int voiceKey = voiceLeveWidgets.GetKey(n);
88 ImageWidget voiceWidget = voiceLeveWidgets.Get(n);
89
90 // stop fade timer since it will be refreshed
91 WidgetFadeTimer timer = voiceLevelTimers.Get(n);
92 timer.Stop();
93
94 // show widgets according to the level
95 if ( voiceKey <= level )
96 {
97 voiceWidget.SetAlpha(1.0); // reset from possible previous fade out
98 voiceWidget.Show(true);
99
100 if (fading)
101 {
102 timer.FadeOut(voiceWidget, 3.0);
103 }
104 }
105 else
106 {
107 voiceWidget.Show(false);
108 }
109 }
110 }
DayZGame g_Game
Определения DayZGame.c:4074
Mission mission
Определения DisplayStatus.c:28
Mission class.
Определения gameplay.c:686
Определения Transport.c:70

Перекрестные ссылки g_Game и mission.