55 "CodelockBatteryBar1Hide",
56 "CodelockBatteryBar2Hide",
57 "CodelockBatteryBar3Hide",
58 "CodelockBatteryBar4Hide",
59 "CodelockBatteryBar5Hide",
60 "CodelockBatteryBar6Hide"
94 #ifdef CODELOCKCOMPONENT_LOG
104 if (!
m_FullVisualUpdate && !lightStateChanged && !animationsChanged && !batteryLevelChanged)
106 #ifdef CODELOCKCOMPONENT_LOG
112 if (lightStateChanged)
117 if (animationsChanged)
122 if (batteryLevelChanged)
141 bool reversed =
m_CodeLock.GetReversedState();
166 float currentPercent =
m_CodeLock.GetBatteryEnergy();
182 if (energy <= 0 || !
m_CodeLock.HasValidParent())
326 float visiblePhase, hiddenPhase;
402 bool reversed =
m_CodeLock.GetReversedState();
405 rotationPhase = 180.0;
423 float animationPhase = 0.0;
424 if (hierarchyParent.IsInherited(
House))
428 animationPhase = 0.50;
432 return animationPhase;
437 float animationPhase = 0;
438 if (hierarchyParent.IsInherited(
House))
442 animationPhase = 0.50;
446 animationPhase = 0.60;
451 animationPhase = 0.92;
454 return animationPhase;
473 float animationPhase;
474 float energyPercent =
m_CodeLock.GetBatteryEnergy();
480 animationPhase = 1.0;
489 animationPhase = 1.0;
504 if (batteryPercent <= 0)
507 const int maxBars = 6;
508 float barsFloat =
Math.
Ceil((batteryPercent / 100.0) * maxBars);
class EconomyOutputStrings OFF
void CodeLockComponent(notnull EntityAI parent, int minLockPinLength=MIN_LOCK_PIN_LENGTH)
const string CODELOCK_ANIMATED_FRONT
const string CODELOCK_ANIMATED_BUTTON_GREEN_LIGHT
void SetMainLights(float redPhase, float greenPhase)
float GetAnimationPhaseForFrontPart(EntityAI hierarchyParent, bool reversed)
CodeLockComponent m_Component
void CodeLockVisualManager(DigitalCodeLock codeLock, CodeLockComponent component)
void SetButtonLightColor(bool isRed)
const float BLINK_INTERVAL
float GetAnimationPhaseForBackPart(EntityAI hierarchyParent, bool reversed)
enum CodeLockLightState m_CodeLock
bool HasBatteryLevelChanged()
const string CODELOCK_ANIMATED_R
void StartBlinking(CodeLockLightState blinkState)
void UpdateDetachedAnimations()
float m_LastAnimationPhaseFront
void SetButtonLights(float greenButtonPhase, float redButtonPhase)
const string CODELOCK_ANIMATED_GREEN_LIGHT
void ~CodeLockVisualManager()
bool HasAnimationsChanged()
const float BLINK_CYCLE_TIME
const string CODELOCK_ANIMATED_ZIP
const string CODELOCK_ANIMATED_BACK_R
const string CODELOCK_ANIMATED_BUTTON_RED_LIGHT
const string CODELOCK_ANIMATED_BACK
void SetBatteryLight(float phase)
float m_LastBatteryPercent
const float LIGHT_VISIBLE
CodeLockLightState m_CurrentLightState
const ref array< string > BATTERY_BAR_SELECTIONS
void UpdateBatteryIndicator()
int CalculateVisibleBars(float batteryPercent)
const string CODELOCK_ANIMATED_RED_LIGHT
void SetAllLights(float phase)
CodeLockLightState DetermineRequiredLightState()
void SetButtonLightsOff()
void UpdateAttachedAnimations(EntityAI hierarchyParent)
float m_LastAnimationPhaseBack
void SetLightState(CodeLockLightState newState)
const string CODELOCK_ANIMATED_BATTERY_LIGHT
CodeLockLightState GetCurrentLightState()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float Ceil(float f)
Returns ceil of value.