Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_VariableSightsFOVInfo Interface Reference
Inheritance diagram for SCR_VariableSightsFOVInfo:
[legend]

Public Member Functions

override int GetCount ()
 Returns the number of available elements.
 
override int GetCurrentIndex ()
 Returns currently selected element or -1 if none.
 
override bool IsAdjusting ()
 Returns true when current FOV of the optic does not match the target FOV.
 
override float GetBaseFOV ()
 Returns max field of view provided by this info.
 
- Public Member Functions inherited from SCR_BaseVariableSightsFOVInfo
int GetCount ()
 Returns the number of available elements.
 
int GetCurrentIndex ()
 Returns currently selected element or -1 if none.
 
bool SetNext (bool allowOverflow=true)
 Selects next available element.
 
bool SetPrevious (bool allowUnderflow=true)
 Selects previous available element.
 
bool IsAdjusting ()
 Returns true when current FOV of the optic does not match the target FOV.
 
float GetBaseFOV ()
 Returns true when current FOV of the optic does not match the target FOV.
 
- Public Member Functions inherited from SightsFOVInfo
proto external float GetFOV ()
 Returns current field of view provided by this info.
 

Protected Member Functions

override void SetIndex (int index)
 Set provided element as the current one.
 
override void OnInit (IEntity owner, BaseSightsComponent sights)
 Called on initialization.
 
override void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 Called every frame when active to update current state.
 
override float GetCurrentFOV ()
 Returns current field of view provided by this info.
 
- Protected Member Functions inherited from SCR_BaseVariableSightsFOVInfo
int GetNextIndex (bool allowOverflow=true)
 Returns the index of next available element.
 
int GetPreviousIndex (bool allowUnderflow=true)
 Returns the index of previous available element.
 
void SetIndex (int index)
 Set provided element as the current one.
 
void OnInit (IEntity owner, BaseSightsComponent sights)
 Called on initialization.
 
void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 Called every frame when active to update current state.
 
float GetCurrentFOV ()
 Return current field of view of this info.
 

Protected Attributes

ref array< float > m_aFOVs
 
float m_fInterpolationSpeed
 
float m_fCurrentFOV = 60.0
 Immediate field of view value.
 
int m_iCurrentIndex = -1
 Currently selected FOV or -1 if none.
 

Member Function Documentation

◆ GetBaseFOV()

override float SCR_VariableSightsFOVInfo.GetBaseFOV ( )

Returns max field of view provided by this info.

Assumes that first FOV is the largest one. Returns zero if FOVs array is empty.

Returns
Returns field of view in degrees.

Implements SCR_BaseVariableSightsFOVInfo.

◆ GetCount()

override int SCR_VariableSightsFOVInfo.GetCount ( )

Returns the number of available elements.

Implements SCR_BaseVariableSightsFOVInfo.

◆ GetCurrentFOV()

override float SCR_VariableSightsFOVInfo.GetCurrentFOV ( )
protected

Returns current field of view provided by this info.

Returns
Returns field of view in degrees.

Implements ScriptedSightsFOVInfo.

◆ GetCurrentIndex()

override int SCR_VariableSightsFOVInfo.GetCurrentIndex ( )

Returns currently selected element or -1 if none.

Implements SCR_BaseVariableSightsFOVInfo.

◆ IsAdjusting()

override bool SCR_VariableSightsFOVInfo.IsAdjusting ( )

Returns true when current FOV of the optic does not match the target FOV.

Implements SCR_BaseVariableSightsFOVInfo.

◆ OnInit()

override void SCR_VariableSightsFOVInfo.OnInit ( IEntity  owner,
BaseSightsComponent  sights 
)
protected

Called on initialization.

Parameters
ownerParent weapon entity.
sightsParent sights component.

Implements ScriptedSightsFOVInfo.

◆ OnUpdate()

override void SCR_VariableSightsFOVInfo.OnUpdate ( IEntity  owner,
BaseSightsComponent  sights,
float  timeSlice 
)
protected

Called every frame when active to update current state.

Parameters
ownerParent weapon entity.
sightsParent sights component.
timeSliceDelta of time since last update.

Implements ScriptedSightsFOVInfo.

◆ SetIndex()

override void SCR_VariableSightsFOVInfo.SetIndex ( int  index)
protected

Set provided element as the current one.

Parameters
indexIndex of FOV element.

Implements SCR_BaseVariableSightsFOVInfo.

Member Data Documentation

◆ m_aFOVs

ref array<float> SCR_VariableSightsFOVInfo.m_aFOVs
protected

◆ m_fCurrentFOV

float SCR_VariableSightsFOVInfo.m_fCurrentFOV = 60.0
protected

Immediate field of view value.

◆ m_fInterpolationSpeed

float SCR_VariableSightsFOVInfo.m_fInterpolationSpeed
protected

◆ m_iCurrentIndex

int SCR_VariableSightsFOVInfo.m_iCurrentIndex = -1
protected

Currently selected FOV or -1 if none.


The documentation for this interface was generated from the following file: