Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ManualCameraAdjustSpeedHintCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), SCR_BaseContainerHintCondition()]
3 {
4  //------------------------------------------------------------------------------------------------
5  protected SCR_AdjustSpeedManualCameraComponent GetComponent(Managed owner)
6  {
7  SCR_ManualCamera camera = SCR_ManualCamera.Cast(owner);
8  if (camera)
9  return SCR_AdjustSpeedManualCameraComponent.Cast(camera.FindCameraComponent(SCR_AdjustSpeedManualCameraComponent));
10  else
11  return null;
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  protected void OnSpeedChange(float speed, bool isManualChange)
16  {
17  if (isManualChange)
18  Activate();
19  }
20 
21  //------------------------------------------------------------------------------------------------
22  override protected void OnInitCondition(Managed owner)
23  {
24  SCR_AdjustSpeedManualCameraComponent component = GetComponent(owner);
25  if (component)
26  component.GetOnSpeedChange().Insert(OnSpeedChange);
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  override protected void OnExitCondition(Managed owner)
31  {
32  SCR_AdjustSpeedManualCameraComponent component = GetComponent(owner);
33  if (component)
34  component.GetOnSpeedChange().Remove(OnSpeedChange);
35  }
36 }
SCR_BaseHintCondition
Definition: SCR_BaseHintCondition.c:2
SCR_ManualCamera
Definition: SCR_ManualCamera.c:16
SCR_ManualCameraAdjustSpeedHintCondition
Definition: SCR_ManualCameraAdjustSpeedHintCondition.c:2
Activate
protected void Activate()
Definition: SCR_BaseHintCondition.c:9
SCR_AdjustSpeedManualCameraComponent
Adjusting speed at small increments for manual camera.
Definition: SCR_AdjustSpeedManualCameraComponent.c:5
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