class CodeLockVisualManager
Constructors 2
void CodeLockVisualManager(DigitalCodeLock codeLock, CodeLockComponent component)Referenced by DigitalCodeLock.Init()
void ~CodeLockVisualManager()References StopBlinking()
Constants 25
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 float FRONT_PART_DEFAULT = 0.0Default animation phase of front part
Referenced by GetAnimationPhaseForFrontPart()
private const float FRONT_PART_HOUSE_REVERSED = 0.50Animation phase of front part when lock state is reversed and parent is some type of house
Referenced by GetAnimationPhaseForFrontPart()
private const float BACK_PART_DEFAULT = 0.0Default animation phase of back part offset
Referenced by GetAnimationPhaseForBackPart()
private const float BACK_PART_HOUSE = 0.50Animation phase of back part offset when parent is some type of house and the door is reversed
Referenced by GetAnimationPhaseForBackPart()
private const float BACK_PART_HOUSE_NORMAL = 0.60Animation phase of back part offset when parent is some type of house and the door is not reversed
Referenced by GetAnimationPhaseForBackPart()
private const float BACK_PART_BB = 0.92Animation phase of back part offset when parent is some type of base building object (Fence)
Referenced by GetAnimationPhaseForBackPart()
private const float FRONT_PART_ROTATION_DEFAULT = 0.0Default animation phase of front part rotation
Referenced by UpdateAttachedAnimations()
private const float FRONT_PART_ROTATION_REVERSED = 180.0Animation phase of front part rotation when lock state is reversed
Referenced by UpdateAttachedAnimations()
private const float BACK_PART_ROTATION = 90.0Animation phase of back part rotation
Referenced by UpdateAttachedAnimations()
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()
private const int MAX_BATTERY_INDICATORS = 6Referenced by CalculateVisibleBars()
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()
Show 12 more
, Entity.SetAnimationPhase(), BACK_PART_ROTATION, CODELOCK_ANIMATED_BACK, CODELOCK_ANIMATED_BACK_R, CODELOCK_ANIMATED_FRONT, CODELOCK_ANIMATED_R, CODELOCK_ANIMATED_ZIP, FRONT_PART_ROTATION_DEFAULT, FRONT_PART_ROTATION_REVERSED, m_CodeLock, m_LastAnimationPhaseBack, and m_LastAnimationPhaseFrontReferenced by UpdateAnimations()
References Class.IsInherited(), BACK_PART_BB, BACK_PART_DEFAULT
Show 2 more
, BACK_PART_HOUSE, and BACK_PART_HOUSE_NORMALprotected void UpdateDetachedAnimations()Referenced by UpdateAnimations()
protected void UpdateBatteryIndicator()Referenced by UpdateVisuals()
References Math.Ceil(), DigitalCodeLock.HasValidParent(), Math.Max()
Show 3 more
, Math.Min(), m_CodeLock, and MAX_BATTERY_INDICATORSCodeLockLightState GetCurrentLightState()References m_CurrentLightState
bool IsBlinking()References m_IsBlinking