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

◆ UpdateVisuals()

void UpdateVisuals ( )
protected

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

553 {
554 //Client/Server
555 if (IsLockedOnParent())
556 {
557 g_Game.GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( HideItem, 0, false );
558 g_Game.GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( ShowAttached, 0, false );
559 }
560 else
561 {
562 g_Game.GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( ShowItem, 0, false );
563 g_Game.GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( HideAttached, 0, false );
564 }
565
566 bool changedOutside = (m_LockActionPerformed == LockAction.DIAL_INDEX_CHANGED_OUTSIDE);
567 bool changedInside = (m_LockActionPerformed == LockAction.DIAL_INDEX_CHANGED_INSIDE);
568
569 bool chanedOutside = (m_LockActionPerformed == LockAction.DIAL_NUMBER_CHANED_OUTSIDE);
570 bool chanedInside = (m_LockActionPerformed == LockAction.DIAL_NUMBER_CHANED_INSIDE);
571
572 string combinationText;
573 if (changedOutside)
574 {
575 combinationText = m_Combination.ToString();
576 }
577 else if (changedInside)
578 {
579 combinationText = m_CombinationInside.ToString();
580 }
581
582 //insert zeros to dials with 0 value
583 int lengthDiff = m_LockDigits - combinationText.Length();
584 for (int i = 0; i < lengthDiff; ++i)
585 {
586 combinationText = "0" + combinationText;
587 }
588
589 //assemble the whole combination with increased part
590 for (int j = 0; j < combinationText.Length(); ++j)
591 {
592 if (changedOutside && j == m_DialIndex || changedInside && j == m_DialIndexInside)
593 {
594 int nextDialedNumber = combinationText.Get(j).ToInt() + 1;
595 if (nextDialedNumber > 9)
596 {
597 nextDialedNumber = 0;
598 }
599
600 if (changedOutside)
601 {
603 }
604 else if (changedInside)
605 {
607 }
608 }
609 }
610
611 if (!changedOutside && !changedInside && !chanedOutside && !chanedInside)
612 {
614 }
615 }
void AnimateDigitsInside(string digitIndex)
Определения CombinationLock.c:746
void HideAttached()
Определения CombinationLock.c:670
int m_LockDigits
Определения CombinationLock.c:32
void ShowAttached()
Определения CombinationLock.c:663
bool IsLockedOnParent()
Определения CombinationLock.c:523
void ShowItem()
Определения CombinationLock.c:649
LockAction
Определения CombinationLock.c:13
int m_Combination
Определения CombinationLock.c:33
void UpdateLockDigits()
Определения CombinationLock.c:762
void AnimateDigitsOutside(string digitIndex)
Определения CombinationLock.c:730
int m_DialIndexInside
Определения CombinationLock.c:37
int m_DialIndex
Определения CombinationLock.c:36
int m_CombinationInside
Определения CombinationLock.c:34
LockAction m_LockActionPerformed
Определения CombinationLock.c:41
void HideItem()
Определения CombinationLock.c:656
DayZGame g_Game
Определения DayZGame.c:4074
proto string ToString()
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
proto native int ToInt()
Converts string to integer.
const int CALL_CATEGORY_GAMEPLAY
Определения 3_Game/DayZ/tools/tools.c:10

Перекрестные ссылки AnimateDigitsInside(), AnimateDigitsOutside(), CALL_CATEGORY_GAMEPLAY, g_Game, string::Get(), HideAttached(), HideItem(), IsLockedOnParent(), string::Length(), m_Combination, m_CombinationInside, m_DialIndex, m_DialIndexInside, m_LockActionPerformed, m_LockDigits, ShowAttached(), ShowItem(), string::ToInt(), ToString() и UpdateLockDigits().