Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DeployCollimatorAction.c
Go to the documentation of this file.
2{
3 [Attribute(desc: "When true, this sight is stowed by default")]
4 protected bool m_bSightStowedOnStart;
5
6 protected bool m_bSightIsUnstowed;
7
8 //------------------------------------------------------------------------------------------------
9 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
10 {
12
13 super.Init(pOwnerEntity, pManagerComponent);
14 }
15
16 //------------------------------------------------------------------------------------------------
19 override protected bool OnSaveActionData(ScriptBitWriter writer)
20 {
21 bool saved = super.OnSaveActionData(writer);
23 return saved;
24
26 SCR_HelicopterCollimatorSightComponent helicopterCollimator = SCR_HelicopterCollimatorSightComponent.Cast(m_SightsComponent);
27 if (helicopterCollimator)
28 helicopterCollimator.OverrideSightState(m_bSightIsUnstowed);
29
30 return saved;
31 }
32
33 //------------------------------------------------------------------------------------------------
37 override protected bool OnLoadActionData(ScriptBitReader reader)
38 {
39 bool loaded = super.OnLoadActionData(reader);
41 return loaded;
42
44 SCR_HelicopterCollimatorSightComponent helicopterCollimator = SCR_HelicopterCollimatorSightComponent.Cast(m_SightsComponent);
45 if (helicopterCollimator)
46 helicopterCollimator.OverrideSightState(m_bSightIsUnstowed);
47
48 return loaded;
49 }
50
51 //------------------------------------------------------------------------------------------------
52 override bool GetActionNameScript(out string outName)
53 {
54 UIInfo actionInfo = GetUIInfo();
55 if (!actionInfo)
56 return false;
57
58 if (Math.Round(GetCurrentValue()) == 0)
59 outName = actionInfo.GetName();
60 else
61 outName = actionInfo.GetDescription();
62
63 return true;
64 }
65}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Math.c:13
SCR_CollimatorSightsComponent m_SightsComponent
float m_fTargetValue
Normalized current value.
bool m_bIsAdjustedByPlayer
Interacted with by main entity. Allows reading input actions.
bool OnSaveActionData(ScriptBitWriter writer)
bool OnLoadActionData(ScriptBitReader reader)
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
override bool GetActionNameScript(out string outName)
UIInfo - allows to define UI elements.
Definition UIInfo.c:14
SCR_FieldOfViewSettings Attribute