DIFF

class CodeLockVisualManager

Constructors 2

void ~CodeLockVisualManager()
References StopBlinking()

Constants 25

private const float LIGHT_VISIBLE = 0.0

Animation phase for visible light

private const float LIGHT_HIDDEN = 1.0

Animation phase for hidden light

private const float FRONT_PART_DEFAULT = 0.0

Default animation phase of front part

private const float FRONT_PART_HOUSE_REVERSED = 0.50

Animation phase of front part when lock state is reversed and parent is some type of house

private const float BACK_PART_DEFAULT = 0.0

Default animation phase of back part offset

private const float BACK_PART_HOUSE = 0.50

Animation phase of back part offset when parent is some type of house and the door is reversed

private const float BACK_PART_HOUSE_NORMAL = 0.60

Animation phase of back part offset when parent is some type of house and the door is not reversed

private const float BACK_PART_BB = 0.92

Animation phase of back part offset when parent is some type of base building object (Fence)

private const float FRONT_PART_ROTATION_DEFAULT = 0.0

Default animation phase of front part rotation

private const float FRONT_PART_ROTATION_REVERSED = 180.0

Animation phase of front part rotation when lock state is reversed

private const float BACK_PART_ROTATION = 90.0

Animation phase of back part rotation

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"
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" }
private const int MAX_BATTERY_INDICATORS = 6

Members 13

private CodeLockLightState m_CurrentLightState
private bool m_IsBlinking
private float m_LastBatteryPercent
private bool m_LastReversedState
private float m_LastAnimationPhaseFront
private float m_LastAnimationPhaseBack
private int m_LastVisibleBars
private bool m_FullVisualUpdate
private ref Timer m_BlinkTimer
Referenced by StartBlinking(), and StopBlinking()
private float m_BlinkTime
private bool m_BlinkPhase

true = light on, false = light off

Methods 25

protected void SetMainLights(float redPhase, float greenPhase)
Referenced by SetAllLights(), and SetLightState()
protected void SetButtonLights(float greenButtonPhase, float redButtonPhase)
protected void SetBatteryLight(float phase)
protected void SetAllLights(float phase)
Referenced by SetLightState()
protected void StartBlinking(CodeLockLightState blinkState)
Referenced by SetLightState()
protected void StopBlinking()
References Timer.Stop(), m_BlinkPhase, m_BlinkTime
Show 2 more, m_BlinkTimer, and m_IsBlinking
void UpdateBlinking()
void SetButtonLightColor(bool isRed)
void SetButtonLightsOff()
protected void UpdateAnimations()
Referenced by UpdateVisuals()
protected float GetAnimationPhaseForFrontPart(EntityAI hierarchyParent, bool reversed)
protected float GetAnimationPhaseForBackPart(EntityAI hierarchyParent, bool reversed)
protected int CalculateVisibleBars(float batteryPercent)
CodeLockLightState GetCurrentLightState()
bool IsBlinking()
References m_IsBlinking