Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SpeedBoostManualCameraComponent.c
Go to the documentation of this file.
1 
4 [BaseContainerProps(), SCR_BaseManualCameraComponentTitle()]
6 {
7  [Attribute("3")]
8  private float m_fSpeedBoost;
9 
10  private float m_fSpeedBoostActive = 1;
11 
12  //------------------------------------------------------------------------------------------------
13  protected void ManualCameraSpeedBoostDown(float value, EActionTrigger trigger)
14  {
15  if (!IsEnabled())
16  return;
17 
18  m_fSpeedBoostActive = m_fSpeedBoost * value;
19  }
20 
21  //------------------------------------------------------------------------------------------------
22  protected void ManualCameraSpeedBoostUp(float value, EActionTrigger trigger)
23  {
24  if (!IsEnabled())
25  return;
26 
27  m_fSpeedBoostActive = 1;
28  }
29 
30  //------------------------------------------------------------------------------------------------
31  override void EOnCameraFrame(SCR_ManualCameraParam param)
32  {
33  if (!param.isManualInputEnabled)
34  return;
35 
36  if (m_fSpeedBoostActive != 1)
37  param.multiplier *= m_fSpeedBoostActive;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  override bool EOnCameraInit()
42  {
43  GetInputManager().AddActionListener("ManualCameraSpeedBoost", EActionTrigger.DOWN, ManualCameraSpeedBoostDown);
44  GetInputManager().AddActionListener("ManualCameraSpeedBoost", EActionTrigger.UP, ManualCameraSpeedBoostUp);
45  return true;
46  }
47 
48  //------------------------------------------------------------------------------------------------
49  override void EOnCameraExit()
50  {
51  GetInputManager().RemoveActionListener("ManualCameraSpeedBoost", EActionTrigger.DOWN, ManualCameraSpeedBoostDown);
52  GetInputManager().RemoveActionListener("ManualCameraSpeedBoost", EActionTrigger.UP, ManualCameraSpeedBoostUp);
53  }
54 }
SCR_SpeedBoostManualCameraComponent
Speed boost for camera movement.
Definition: SCR_SpeedBoostManualCameraComponent.c:5
SCR_BaseManualCameraComponent
Parent class from which all SCR_ManualCamera components inherit.
Definition: SCR_BaseManualCameraComponent.c:5
Attribute
typedef Attribute
Post-process effect of scripted camera.
IsEnabled
int IsEnabled()
Definition: SCR_BaseManualCameraComponent.c:99
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition: SCR_ManualCameraParam.c:5
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468