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

◆ RandomizePageIndex()

void ScriptedWidgetEventHandler::RandomizePageIndex ( )
inlineprotected

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

172 {
173 #ifdef DIAG_DEVELOPER
174 if (DiagMenu.IsInitialized())
175 {
176 if (m_ForcedIndex != -1)
177 {
178 m_PageIndex = Math.Clamp(m_ForcedIndex,0,m_ContentList.Count() - 1);
179 return;
180 }
181 }
182 #endif
183
184 Math.Randomize(m_Game.GetTime());
185 Math.RandomFloat01();//throw-away value, without calling this, the next random number is always the same, calling Math.Randomize(-1) makes no difference
187 m_PageIndex = Math.RandomIntInclusive(0, m_ContentList.Count() - 1);
189
190 }
int m_PreviousRandomIndex
Определения UiHintPanel.c:30
DayZGame m_Game
Определения UiHintPanel.c:27
int m_PageIndex
Определения UiHintPanel.c:26
ref array< ref HintPage > m_ContentList
Определения UiHintPanel.c:25

Перекрестные ссылки Math::Clamp(), DiagMenu::IsInitialized(), m_ContentList, m_Game, m_PageIndex, m_PreviousRandomIndex, Math::RandomFloat01(), Math::RandomIntInclusive() и Math::Randomize().

Используется в Init() и ShowRandomPage().