Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HelicopterEngineAction.c
Go to the documentation of this file.
2{
4 [Attribute(defvalue: "3.0", desc: "Maximum animation signal phase to be reached within ActionDuration")]
5 protected float m_fEngineTogglePhase;
6
9 protected float m_fStartingSequencePhase;
10
11 //------------------------------------------------------------------------------------------------
12 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
13 {
14 super.Init(pOwnerEntity, pManagerComponent);
15
17 if (!m_SignalManager)
18 return;
19 m_iStartingSequenceSignal = m_SignalManager.AddOrFindSignal("startingSequence");
20 }
21
22 override bool CanBeShownScript(IEntity user)
23 {
24 return m_SignalManager && super.CanBeShownScript(user);
25 }
26
27 //------------------------------------------------------------------------------------------------
28 override void PerformContinuousAction(IEntity pOwnerEntity, IEntity pUserEntity, float timeSlice)
29 {
30 float duration = Math.AbsFloat(GetActionDuration());
31 if (duration > 0)
32 {
33 m_fStartingSequencePhase += m_fEngineTogglePhase * timeSlice / duration;
35 }
36 else
37 {
39 }
40
42 {
43 if (m_bTargetState)
45 else
47 }
48
49 if (float.AlmostEqual(m_fStartingSequencePhase, m_fEngineTogglePhase))
51 }
52
61
62 //------------------------------------------------------------------------------------------------
63 override void SetState(bool enable)
64 {
65 super.SetState(enable);
66
67 if (!m_SignalManager)
68 return;
69
70 if (enable)
72 else
74 }
75};
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external float GetActionDuration()
Returns the duration of this action in seconds.
proto external Managed FindComponent(typename typeName)
Definition Math.c:13
override void PerformContinuousAction(IEntity pOwnerEntity, IEntity pUserEntity, float timeSlice)
override void OnActionStart(IEntity pUserEntity)
override bool CanBeShownScript(IEntity user)
SignalsManagerComponent m_SignalManager
float m_fEngineTogglePhase
Maximum animation signal phase.
override void SetState(bool enable)
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
bool m_bTargetState
Target state of the action, ignored if toggle.
SCR_FieldOfViewSettings Attribute