class CodeLockVisualManager
Constructors 2
void CodeLockVisualManager(DigitalCodeLock codeLock, CodeLockComponent component)Referenced by DigitalCodeLock.Init()
void ~CodeLockVisualManager()References StopBlinking()
Constants 15
private const float BLINK_INTERVAL = 0.1private const float BLINK_CYCLE_TIME = 1.0Referenced by UpdateBlinking()
private const float LIGHT_VISIBLE = 0.0Animation phase for visible light
private const float LIGHT_HIDDEN = 1.0Animation phase for hidden light
Referenced by ApplyBlinkState(), SetButtonLightColor(), SetButtonLightsOff()
Show 1 more
, SetLightState()private const string CODELOCK_ANIMATED_FRONT = "CodelockFrontTranslation"private const string CODELOCK_ANIMATED_BACK = "CodelockBackTranslation"private const string CODELOCK_ANIMATED_BACK_R = "CodelockBackRotation"private const string CODELOCK_ANIMATED_R = "CodelockRotation"const string CODELOCK_ANIMATED_ZIP = "CodelockZipHide"Referenced by BroadcastedBunker.ResolveCodeLock(), UpdateAttachedAnimations(), and UpdateDetachedAnimations()
const string CODELOCK_ANIMATED_RED_LIGHT = "CodelockRedLightOnHide"const string CODELOCK_ANIMATED_GREEN_LIGHT = "CodelockGreenLightOnHide"const string CODELOCK_ANIMATED_BUTTON_GREEN_LIGHT = "CodelockButtonGreenLightOnHide"Referenced by SetButtonLights()
const string CODELOCK_ANIMATED_BUTTON_RED_LIGHT = "CodelockButtonRedLightOnHide"Referenced by SetButtonLights()
const string CODELOCK_ANIMATED_BATTERY_LIGHT = "CodelockBatteryLightOnHide"Referenced by SetBatteryLight()
private const ref array<string> BATTERY_BAR_SELECTIONS = { "CodelockBatteryBar1Hide", "CodelockBatteryBar2Hide", "CodelockBatteryBar3Hide", "CodelockBatteryBar4Hide", "CodelockBatteryBar5Hide", "CodelockBatteryBar6Hide" }Referenced by UpdateBatteryIndicator()
Members 13
private DigitalCodeLock m_CodeLockprivate CodeLockComponent m_Componentprivate CodeLockLightState m_CurrentLightStateReferenced by ApplyBlinkState(), CodeLockVisualManager(), GetCurrentLightState()
Show 2 more
, SetLightState(), and UpdateVisuals()private bool m_IsBlinkingReferenced by CodeLockVisualManager(), IsBlinking(), StartBlinking()
Show 2 more
, StopBlinking(), and UpdateBlinking()private float m_LastBatteryPercentprivate bool m_LastReversedStateprivate float m_LastAnimationPhaseFrontReferenced by CodeLockVisualManager(), HasAnimationsChanged(), UpdateAttachedAnimations()
Show 1 more
, UpdateDetachedAnimations()private float m_LastAnimationPhaseBackReferenced by CodeLockVisualManager(), HasAnimationsChanged(), UpdateAttachedAnimations()
Show 1 more
, UpdateDetachedAnimations()private int m_LastVisibleBarsprivate bool m_FullVisualUpdateprivate ref Timer m_BlinkTimerprivate float m_BlinkTimeReferenced by CodeLockVisualManager(), StartBlinking(), StopBlinking()
Show 1 more
, UpdateBlinking()private bool m_BlinkPhasetrue = light on, false = light off
Referenced by ApplyBlinkState(), CodeLockVisualManager(), StartBlinking()
Show 2 more
, StopBlinking(), and UpdateBlinking()Methods 25
void MarkDirty()References m_FullVisualUpdate
void UpdateVisuals()protected bool HasAnimationsChanged()References GetAnimationPhaseForBackPart(), GetAnimationPhaseForFrontPart(), EntityAI.GetHierarchyRoot()
Referenced by UpdateVisuals()
bool HasBatteryLevelChanged()References CalculateVisibleBars(), DigitalCodeLock.GetBatteryEnergy(), DigitalCodeLock.HasValidParent()
Show 2 more
, m_CodeLock, and m_LastVisibleBarsprotected CodeLockLightState DetermineRequiredLightState()References DigitalCodeLock.GetBatteryEnergy(), CodeLockComponent.GetStage(), CodeLockComponent.HasBruteForceProtection()
Referenced by UpdateVisuals()
void SetLightState(CodeLockLightState newState)References SetAllLights(), SetButtonLights(), SetMainLights()
Show 5 more
, StartBlinking(), StopBlinking(), LIGHT_HIDDEN, LIGHT_VISIBLE, and m_CurrentLightStateReferenced by UpdateVisuals()
References Entity.SetAnimationPhase(), CODELOCK_ANIMATED_GREEN_LIGHT, CODELOCK_ANIMATED_RED_LIGHT
Show 1 more
, m_CodeLockReferences Entity.SetAnimationPhase(), CODELOCK_ANIMATED_BUTTON_GREEN_LIGHT, CODELOCK_ANIMATED_BUTTON_RED_LIGHT
Show 1 more
, m_CodeLockReferenced by ApplyBlinkState(), SetAllLights(), SetButtonLightColor()
Show 2 more
, SetButtonLightsOff(), and SetLightState()protected void SetBatteryLight(float phase)Referenced by UpdateBatteryIndicator()
protected void SetAllLights(float phase)Referenced by SetLightState()
protected void StartBlinking(CodeLockLightState blinkState)References Timer.Run(), new Timer(), BLINK_INTERVAL
Show 4 more
, m_BlinkPhase, m_BlinkTime, m_BlinkTimer, and m_IsBlinkingReferenced by SetLightState()
protected void StopBlinking()void UpdateBlinking()References ApplyBlinkState(), BLINK_CYCLE_TIME, BLINK_INTERVAL
Show 3 more
, m_BlinkPhase, m_BlinkTime, and m_IsBlinkingprotected void ApplyBlinkState()References Entity.SetAnimationPhase(), SetButtonLights(), CODELOCK_ANIMATED_GREEN_LIGHT
Show 6 more
, CODELOCK_ANIMATED_RED_LIGHT, LIGHT_HIDDEN, LIGHT_VISIBLE, m_BlinkPhase, m_CodeLock, and m_CurrentLightStateReferenced by UpdateBlinking()
void SetButtonLightColor(bool isRed)void SetButtonLightsOff()protected void UpdateAnimations()References EntityAI.GetHierarchyRoot(), DigitalCodeLock.HasValidParent(), UpdateAttachedAnimations()
Show 2 more
, UpdateDetachedAnimations(), and m_CodeLockReferenced by UpdateVisuals()
protected void UpdateAttachedAnimations(EntityAI hierarchyParent)References GetAnimationPhaseForBackPart(), GetAnimationPhaseForFrontPart(), DigitalCodeLock.GetReversedState()
Referenced by UpdateAnimations()
References Class.IsInherited()
References Class.IsInherited()
protected void UpdateDetachedAnimations()Referenced by UpdateAnimations()
protected void UpdateBatteryIndicator()Referenced by UpdateVisuals()
References Math.Ceil(), DigitalCodeLock.HasValidParent(), Math.Max()
Show 2 more
, Math.Min(), and m_CodeLockCodeLockLightState GetCurrentLightState()References m_CurrentLightState
bool IsBlinking()References m_IsBlinking