Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CameraParticleEditorAttribute.c
Go to the documentation of this file.
1 
6 {
7  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
8  {
9  if (!item.IsInherited(SCR_CameraBase)) return null;
10 
12  if (!cameraParticlesManager) return null;
13 
14  return SCR_BaseEditorAttributeVar.CreateInt(cameraParticlesManager.GetCurrentEffect());
15  }
16  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
17  {
19  if (!cameraParticlesManager) return;
20 
21  if (var) cameraParticlesManager.SetCurrentEffect(var.GetInt());
22  }
23  override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
24  {
25  WriteVariable(null, GetVariable(), manager, -1);
26  }
27  override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
28  {
29  outEntries.Clear();
30 
32  if (!cameraParticlesManager) return 0;
33 
34  array<SCR_CameraParticleEditor> effects = new array<SCR_CameraParticleEditor>;
35  int effectsCount = cameraParticlesManager.GetEffects(effects);
36  if (effectsCount == 0) return 0;
37 
38  for (int i = 0; i < effectsCount; i++)
39  {
40  outEntries.Insert(new SCR_BaseEditorAttributeEntryText(effects[i].GetDisplayName()));
41  }
42  return effectsCount;
43  }
44 };
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_CameraParticleEditorAttribute
Definition: SCR_CameraParticleEditorAttribute.c:5
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_CameraBase
Definition: SCR_CameraBase.c:9
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
SCR_CameraParticlesEditorComponent
Definition: SCR_CameraParticlesEditorComponent.c:28
SCR_BaseEditorAttributeEntryText
void SCR_BaseEditorAttributeEntryText(string text)
Definition: SCR_BaseEditorAttribute.c:486
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