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

◆ SetNextDial()

void SetNextDial ( int lockSide = FACING_OUTSIDE)
protected

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

341 {
342 bool isInsideLock = (lockSide == FACING_INSIDE);
343
344 int dialIndex;
345 if (!isInsideLock)
346 dialIndex = m_DialIndex;
347 else
348 dialIndex = m_DialIndexInside;
349
350 if (m_LockDigits > 1)
351 {
352 if (dialIndex <= m_LockDigits - 2)
353 {
354 dialIndex++;
355 }
356 else if (dialIndex >= m_LockDigits - 1)
357 {
358 dialIndex = 0;
359 }
360 }
361 else
362 {
363 dialIndex = 0;
364 }
365
366 if (!isInsideLock)
367 {
368 m_DialIndex = dialIndex;
369 //performed action
370 m_LockActionPerformed = LockAction.DIAL_NUMBER_CHANED_OUTSIDE;
371 }
372 else
373 {
374 m_DialIndexInside = dialIndex;
375 //performed action
376 m_LockActionPerformed = LockAction.DIAL_NUMBER_CHANED_INSIDE;
377 }
378
379 //synchronize
380 Synchronize();
381 }
int m_LockDigits
Определения CombinationLock.c:32
static const int FACING_INSIDE
Определения CombinationLock.c:30
LockAction
Определения CombinationLock.c:13
void Synchronize()
Определения CombinationLock.c:205
int m_DialIndexInside
Определения CombinationLock.c:37
int m_DialIndex
Определения CombinationLock.c:36
LockAction m_LockActionPerformed
Определения CombinationLock.c:41

Перекрестные ссылки FACING_INSIDE, FACING_OUTSIDE, m_DialIndex, m_DialIndexInside, m_LockActionPerformed, m_LockDigits и Synchronize().