Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_PowerComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_PowerComponentClass
 

Functions

SCR_PowerComponentClass ScriptGameComponentClass Attribute (defvalue:"1", uiwidget:UIWidgets.CheckBox, desc:"Should the engine output be reduced when there's no power (batteries destroyed)")] private bool m_bShouldApplyNoPowerPenalty
 
bool HasPower ()
 
bool ShouldApplyNoPowerPenalty ()
 
float GetNoPowerMultiplier ()
 
ScriptInvoker GetEventBatteryStateChanged (bool createNew=true)
 
void UpdatePowerState ()
 
void RegisterBatteryHitZone (notnull HitZone hitZone)
 

Variables

private float m_fNoPowerMultiplier
 
private ref ScriptInvoker m_EventBatteryStateChanged
 
private ref array< HitZonem_aBatteryHitZones
 
private bool m_bHasPower = true
 

Function Documentation

◆ Attribute()

SCR_PowerComponentClass ScriptGameComponentClass Attribute ( defvalue:"1"  ,
uiwidget:UIWidgets.  CheckBox,
desc:"Should the engine output be reduced when there's no power (batteries destroyed)"   
)

◆ GetEventBatteryStateChanged()

ScriptInvoker GetEventBatteryStateChanged ( bool  createNew = true)
Parameters
[in]createNew
Returns

Definition at line 42 of file SCR_PowerComponent.c.

◆ GetNoPowerMultiplier()

float GetNoPowerMultiplier ( )
Returns

Definition at line 34 of file SCR_PowerComponent.c.

◆ HasPower()

bool HasPower ( )
Returns

Definition at line 20 of file SCR_PowerComponent.c.

◆ RegisterBatteryHitZone()

void RegisterBatteryHitZone ( notnull HitZone  hitZone)
Parameters
[in]hitZone

Definition at line 81 of file SCR_PowerComponent.c.

◆ ShouldApplyNoPowerPenalty()

bool ShouldApplyNoPowerPenalty ( )
Returns

Definition at line 27 of file SCR_PowerComponent.c.

◆ UpdatePowerState()

void UpdatePowerState ( )

If there are battery colliders, check if at leat one of them is not destroyed

Definition at line 52 of file SCR_PowerComponent.c.

Variable Documentation

◆ m_aBatteryHitZones

private ref array<HitZone> m_aBatteryHitZones

Definition at line 15 of file SCR_PowerComponent.c.

◆ m_bHasPower

private bool m_bHasPower = true

Definition at line 16 of file SCR_PowerComponent.c.

◆ m_EventBatteryStateChanged

private ref ScriptInvoker m_EventBatteryStateChanged

Definition at line 14 of file SCR_PowerComponent.c.

◆ m_fNoPowerMultiplier

private float m_fNoPowerMultiplier

Definition at line 12 of file SCR_PowerComponent.c.