Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterSlowdownEasingSystem.c
Go to the documentation of this file.
1
3{
4 protected ref array<SCR_ChimeraCharacter> m_aCharacters = {};
5
6 [Attribute(defvalue: "3", desc: "Transition Strength", params: "0 inf 0.01")]
7 protected float m_fTransitionStrength;
8
9 //------------------------------------------------------------------------------------------------
10 override static void InitInfo(WorldSystemInfo outInfo)
11 {
12 outInfo.SetAbstract(false);
13 outInfo.SetLocation(WorldSystemLocation.Both);
14 outInfo.AddPoint(WorldSystemPoint.FixedFrame);
15 }
16
17 //------------------------------------------------------------------------------------------------
18 protected override void OnInit()
19 {
20 Enable(false);
21 }
22
23 //------------------------------------------------------------------------------------------------
24 protected override void OnUpdatePoint(WorldUpdatePointArgs args)
25 {
26 float dt = args.GetTimeSliceSeconds();
27
28 for (int idx = m_aCharacters.Count() - 1; idx >= 0; idx--)
29 {
30 SCR_ChimeraCharacter character = m_aCharacters[idx];
31 if (!character)
32 {
33 m_aCharacters.Remove(idx);
34 continue;
35 }
36
37 character.UpdateSlowdown(dt * m_fTransitionStrength);
38 }
39 }
40
41 //------------------------------------------------------------------------------------------------
44 void Register(notnull SCR_ChimeraCharacter character)
45 {
46 if (!m_aCharacters.Contains(character))
47 m_aCharacters.Insert(character);
48
49 if (!IsEnabled())
50 Enable(true);
51 }
52
53 //------------------------------------------------------------------------------------------------
56 void Unregister(notnull SCR_ChimeraCharacter character)
57 {
58 if (m_aCharacters.Contains(character))
59 m_aCharacters.RemoveItem(character);
60
61 if (m_aCharacters.IsEmpty())
62 Enable(false);
63 }
64}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
A system to help with easing the slowdown effect applied to the character.
override void OnUpdatePoint(WorldUpdatePointArgs args)
void Register(notnull SCR_ChimeraCharacter character)
void Unregister(notnull SCR_ChimeraCharacter character)
static override void InitInfo(WorldSystemInfo outInfo)
ref array< SCR_ChimeraCharacter > m_aCharacters
Structure holding world system meta-information required by the engine.
Structure holding extra data of WorldSystem update point.
SCR_FieldOfViewSettings Attribute
int IsEnabled()
Returns true if the light is enabled.
WorldSystemPoint
WorldSystemLocation