Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TeleportCameraContextAction.c
Go to the documentation of this file.
1 // Script File
4 {
5  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
6  {
7  return CanBePerformed(hoveredEntity, selectedEntities, cursorWorldPosition, flags);
8  }
9 
10  override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
11  {
12  if (hoveredEntity)
13  {
14  vector pos;
15  return hoveredEntity.GetPos(pos);
16  }
17  else
18  {
19  return cursorWorldPosition != vector.Zero;
20  }
21  }
22 
23  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
24  {
26  if (cameraManager)
27  {
28  SCR_ManualCamera camera = cameraManager.GetCamera();
29  if (camera)
30  {
32  if (teleportComponent)
33  {
34  if (hoveredEntity)
35  hoveredEntity.GetPos(cursorWorldPosition);
36 
37  teleportComponent.TeleportCamera(cursorWorldPosition, true, false);
38  }
39  }
40  }
41  }
42 };
SCR_ManualCamera
Definition: SCR_ManualCamera.c:16
SCR_TeleportCameraContextAction
Definition: SCR_TeleportCameraContextAction.c:3
SCR_CameraEditorComponent
Definition: SCR_CameraEditorComponent.c:13
SCR_GeneralContextAction
Definition: SCR_GeneralContextAction.c:8
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_TeleportToCursorManualCameraComponent
Teleport the camera to the cursor's world position.
Definition: SCR_TeleportToCursorManualCameraComponent.c:5
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
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