DayZ 1.24
Loading...
Searching...
No Matches
UniversalTemperatureSourceDebug Class Reference
Collaboration diagram for UniversalTemperatureSourceDebug:
[legend]

Protected Member Functions

void UniversalTemperatureSource (EntityAI pParent, UniversalTemperatureSourceSettings pSettings, UniversalTemperatureSourceLambdaBase pLambda)
 
void ~UniversalTemperatureSource ()
 
void Init (EntityAI pParent)
 
vector GetPosition ()
 
float GetFullRange ()
 
float GetMaxRange ()
 
float GetTemperature ()
 
float GetTemperatureRaw ()
 
float GetTemperatureMin ()
 
float GetTemperatureMax ()
 
EntityAI GetParent ()
 
bool IsActive ()
 
void SetActive (bool pActive)
 
void SetDefferedActive (bool pActive, float pSeconds)
 
void ChangeSettings (UniversalTemperatureSourceSettings pSettings)
 
void Update (UniversalTemperatureSourceSettings settings, UniversalTemperatureSourceLambdaBase lambda)
 

Protected Attributes

ref UniversalTemperatureSourceTimer m_Timer
 
UniversalTemperatureSourceSettings m_Settings
 
ref UniversalTemperatureSourceResult m_ResultValues
 
ref UniversalTemperatureSourceLambdaBase m_Lambda
 

Detailed Description

Definition at line 49 of file UniversalTemperatureSource.c.

Constructor & Destructor Documentation

◆ ~UniversalTemperatureSource()

void UniversalTemperatureSourceDebug::~UniversalTemperatureSource ( )
inlineprotected

Definition at line 68 of file UniversalTemperatureSource.c.

68{};

Member Function Documentation

◆ ChangeSettings()

void UniversalTemperatureSourceDebug::ChangeSettings ( UniversalTemperatureSourceSettings pSettings)
inlineprotected

Definition at line 162 of file UniversalTemperatureSource.c.

References m_Timer.

◆ GetFullRange()

float UniversalTemperatureSourceDebug::GetFullRange ( )
inlineprotected

Definition at line 94 of file UniversalTemperatureSource.c.

95 {
97 }
float m_RangeFull
temperature cap that will limit the return value from GetTemperature method

References UniversalTemperatureSourceSettings::m_RangeFull.

◆ GetMaxRange()

float UniversalTemperatureSourceDebug::GetMaxRange ( )
inlineprotected

Definition at line 99 of file UniversalTemperatureSource.c.

100 {
101 return m_Settings.m_RangeMax;
102 }
float m_RangeMax
range where the full temperature is given to receiver

References UniversalTemperatureSourceSettings::m_RangeMax.

◆ GetParent()

EntityAI UniversalTemperatureSourceDebug::GetParent ( )
inlineprotected

◆ GetPosition()

vector UniversalTemperatureSourceDebug::GetPosition ( )
inlineprotected

Definition at line 89 of file UniversalTemperatureSource.c.

90 {
92 }
vector m_Position
if the temperature generated is also set as Temperature Stat on Item itself

References UniversalTemperatureSourceSettings::m_Position.

◆ GetTemperature()

float UniversalTemperatureSourceDebug::GetTemperature ( )
inlineprotected

Definition at line 104 of file UniversalTemperatureSource.c.

105 {
106 if (m_Settings.m_TemperatureCap != float.MAX)
108
109 return GetTemperatureRaw();
110 }
Definition EnMath.c:7
float m_TemperatureCap
max temperature you can get from the TemperatureSource
const float MAX
Definition EnConvert.c:99
static proto float Min(float x, float y)
Returns smaller of two given values.

References UniversalTemperatureSourceSettings::m_TemperatureCap, float::MAX, and Math::Min().

◆ GetTemperatureMax()

float UniversalTemperatureSourceDebug::GetTemperatureMax ( )
inlineprotected

Definition at line 125 of file UniversalTemperatureSource.c.

126 {
128 }
float m_TemperatureMax
min temperature you can get from the TemperatureSource

References UniversalTemperatureSourceSettings::m_TemperatureMax.

◆ GetTemperatureMin()

float UniversalTemperatureSourceDebug::GetTemperatureMin ( )
inlineprotected

Definition at line 120 of file UniversalTemperatureSource.c.

121 {
123 }
float m_TemperatureMin
how often the Update is ticking

References UniversalTemperatureSourceSettings::m_TemperatureMin.

◆ GetTemperatureRaw()

float UniversalTemperatureSourceDebug::GetTemperatureRaw ( )
inlineprotected

Definition at line 112 of file UniversalTemperatureSource.c.

113 {
114 if (m_ResultValues)
115 return m_ResultValues.m_Temperature;
116
117 return 0;
118 }
ref UniversalTemperatureSourceResult m_ResultValues

◆ Init()

◆ IsActive()

bool UniversalTemperatureSourceDebug::IsActive ( )
inlineprotected

Definition at line 135 of file UniversalTemperatureSource.c.

136 {
138 return m_Active;
139
140 return m_Timer && m_Timer.IsRunning();
141 }

References UniversalTemperatureSourceSettings::m_ManualUpdate, and m_Timer.

◆ SetActive()

void UniversalTemperatureSourceDebug::SetActive ( bool pActive)
inlineprotected

Definition at line 143 of file UniversalTemperatureSource.c.

144 {
146 {
147 m_Active = pActive;
148 return;
149 }
150
151 if (pActive && !m_Timer.IsRunning())
152 m_Timer.Continue();
153 else
154 m_Timer.Stop();
155 }

References UniversalTemperatureSourceSettings::m_ManualUpdate, and m_Timer.

◆ SetDefferedActive()

void UniversalTemperatureSourceDebug::SetDefferedActive ( bool pActive,
float pSeconds )
inlineprotected

Definition at line 157 of file UniversalTemperatureSource.c.

158 {
159 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLaterByName(this, "SetActive", pSeconds * 1000, false, new Param1<bool>(pActive));
160 }
proto native CGame GetGame()
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

References CALL_CATEGORY_GAMEPLAY, and GetGame().

◆ UniversalTemperatureSource()

void UniversalTemperatureSourceDebug::UniversalTemperatureSource ( EntityAI pParent,
UniversalTemperatureSourceSettings pSettings,
UniversalTemperatureSourceLambdaBase pLambda )
inlineprotected

Definition at line 57 of file UniversalTemperatureSource.c.

58 {
59 m_Active = false;
64
66 }
override Widget Init()
Definition DayZGame.c:120

References Init(), and m_Timer.

◆ Update()

void UniversalTemperatureSourceDebug::Update ( UniversalTemperatureSourceSettings settings,
UniversalTemperatureSourceLambdaBase lambda )
inlineprotected

Definition at line 167 of file UniversalTemperatureSource.c.

168 {
169 if (!IsActive())
170 return;
171
172 if (lambda)
173 {
174 settings.m_Position = settings.m_Parent.GetUniversalTemperatureSourcePosition();
176 }
177
178 }

References IsActive().

Member Data Documentation

◆ m_Lambda

ref UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceDebug::m_Lambda
protected

Definition at line 55 of file UniversalTemperatureSource.c.

◆ m_ResultValues

ref UniversalTemperatureSourceResult UniversalTemperatureSourceDebug::m_ResultValues
protected

Definition at line 54 of file UniversalTemperatureSource.c.

◆ m_Settings

UniversalTemperatureSourceSettings UniversalTemperatureSourceDebug::m_Settings
protected

Definition at line 53 of file UniversalTemperatureSource.c.

◆ m_Timer

ref UniversalTemperatureSourceTimer UniversalTemperatureSourceDebug::m_Timer
protected

Definition at line 52 of file UniversalTemperatureSource.c.


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