Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс PlayerStatBase

Защищенные члены

void PlayerStat (T min, T max, T init, string label, int flags)
 
override void Init (int id)
 
override void SerializeValue (array< ref StatDebugObject > objects, int flags)
 
PlayerStats GetManager ()
 
void Set (T value, string system="")
 
void SetByFloat (float value, string system="")
 
override void SetByFloatEx (float value, string system="")
 
void Add (T value, string system="")
 
override float Get ()
 
override string GetLabel ()
 
override float GetMax ()
 
override float GetMin ()
 
override float GetNormalized ()
 
override array< PlayerStatRecordGetRecords ()
 
void CreateRecord (float value, string system)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx)
 

Защищенные данные

T m_MinValue
 
T m_MaxValue
 
T m_Value
 
string m_ValueLabel
 
int m_Flags
 
ref array< PlayerStatRecordm_Records
 
PlayerStats m_Manager
 

Закрытые члены

void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx)
 
void OnRPC (ParamsReadContext ctx)
 
float Get ()
 
string GetLabel ()
 
void SetByFloat (float value)
 
void SetByFloatEx (float value, string system="")
 
bool IsSynced ()
 
array< PlayerStatRecordGetRecords ()
 
void Init (int id)
 
void SerializeValue (array< ref StatDebugObject > objects, int flags)
 
float GetNormalized ()
 
float GetMax ()
 
float GetMin ()
 
int GetType ()
 

Закрытые данные

int m_Type
 

Подробное описание

Методы

◆ Add()

void Add ( T value,
string system = "" )
inlineprotected
107 {
109 }
Definition EntityAI.c:95
T m_Value
Definition PlayerStatBase.c:28
void Set(T value, string system="")
Definition PlayerStatBase.c:63

Перекрестные ссылки m_Value и Set().

◆ CreateRecord()

void CreateRecord ( float value,
string system )
inlineprotected
142 {
144 }
float GetTime()
Definition NotificationSystem.c:35
ref array< PlayerStatRecord > m_Records
Definition PlayerStatBase.c:32
Definition PlayerStatRecord.c:2
proto native CGame GetGame()

Перекрестные ссылки GetGame() и GetTime().

◆ Get() [1/2]

float Get ( )
private

Используется в GetNormalized() и SerializeValue().

◆ Get() [2/2]

override float Get ( )
inlineprotected
112 {
113 return m_Value;
114 }

Перекрестные ссылки m_Value.

◆ GetLabel() [1/2]

string GetLabel ( )
private

Используется в SerializeValue().

◆ GetLabel() [2/2]

override string GetLabel ( )
inlineprotected
117 {
118 return m_ValueLabel;
119 }
string m_ValueLabel
Definition PlayerStatBase.c:29

Перекрестные ссылки m_ValueLabel.

◆ GetManager()

PlayerStats GetManager ( )
inlineprotected
59 {
60 return m_Manager;
61 }
PlayerStats m_Manager
Definition PlayerStatBase.c:33

Перекрестные ссылки m_Manager.

◆ GetMax() [1/2]

float GetMax ( )
private

Используется в GetNormalized().

◆ GetMax() [2/2]

override float GetMax ( )
inlineprotected
122 {
123 return m_MaxValue;
124 }
T m_MaxValue
Definition PlayerStatBase.c:27

Перекрестные ссылки m_MaxValue.

◆ GetMin() [1/2]

float GetMin ( )
private

Используется в GetNormalized().

◆ GetMin() [2/2]

override float GetMin ( )
inlineprotected
127 {
128 return m_MinValue;
129 }
T m_MinValue
Definition PlayerStatBase.c:26

Перекрестные ссылки m_MinValue.

◆ GetNormalized() [1/2]

float GetNormalized ( )
private

◆ GetNormalized() [2/2]

override float GetNormalized ( )
inlineprotected
132 {
133 return Math.InverseLerp(GetMin(), GetMax(), Get());
134 }
Definition EnMath.c:7
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

Перекрестные ссылки Get(), GetMax(), GetMin() и Math::InverseLerp().

◆ GetRecords() [1/2]

array< PlayerStatRecord > GetRecords ( )
private

◆ GetRecords() [2/2]

override array< PlayerStatRecord > GetRecords ( )
inlineprotected
137 {
138 return m_Records;
139 }

Перекрестные ссылки m_Records.

◆ GetType()

int GetType ( )
inlineprivate
19 {
20 return m_Type;
21 }
int m_Type
Definition PlayerStatBase.c:3

Перекрестные ссылки m_Type.

◆ Init() [1/2]

void Init ( int id)
private

◆ Init() [2/2]

override void Init ( int id)
inlineprotected
48 {
49 m_Type = id;
50 //m_Manager = manager;
51 }

Перекрестные ссылки m_Type.

◆ IsSynced()

bool IsSynced ( )
private

◆ OnRPC()

void OnRPC ( ParamsReadContext ctx)
private

◆ OnStoreLoad() [1/2]

bool OnStoreLoad ( ParamsReadContext ctx)
private

◆ OnStoreLoad() [2/2]

override bool OnStoreLoad ( ParamsReadContext ctx)
inlineprotected
154 {
155 //string name;
156
157 //ctx.Read(name);
158 T value;
159 if(ctx.Read(value))
160 {
161 m_Value = value;
162 }
163 else
164 {
165 return false;
166 }
167 //PrintString("loading " + GetLabel()+" value:" +m_Value);
168 return true;
169 }

Перекрестные ссылки m_Value.

◆ OnStoreSave() [1/2]

void OnStoreSave ( ParamsWriteContext ctx)
private

◆ OnStoreSave() [2/2]

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
147 {
148 //ctx.Write(m_ValueLabel);
149 //PrintString("saving " + GetLabel()+" value:" +m_Value);
150 ctx.Write(m_Value);
151 }

Перекрестные ссылки m_Value.

◆ PlayerStat()

void PlayerStat ( T min,
T max,
T init,
string label,
int flags )
inlineprotected
37 {
40 m_Value = init;
42 m_Flags = flags;
43
45 }
enum MagnumStableStateID init
int m_Flags
Definition PlayerStatBase.c:30

Перекрестные ссылки init, m_MaxValue, m_MinValue и m_Value.

◆ SerializeValue() [1/2]

void SerializeValue ( array< ref StatDebugObject > objects,
int flags )
private

◆ SerializeValue() [2/2]

override void SerializeValue ( array< ref StatDebugObject > objects,
int flags )
inlineprotected
54 {
55 objects.Insert( new StatDebugObject(GetLabel(), Get(), eRemoteStatType.PLAYER_STATS) );
56 }
eRemoteStatType
Definition RemotePlayerStatDebug.c:2
string GetLabel()
Definition StatDebugObject.c:2

Перекрестные ссылки Get() и GetLabel().

◆ Set()

void Set ( T value,
string system = "" )
inlineprotected
64 {
65 /*
66 Print("setting stat: " + this.GetLabel() + "| value:" +value.ToString());
67
68 if( this.GetLabel() == "Toxicity" )
69 {
70 DebugPrint.LogAndTrace("stack");
71 }
72 */
73 if ( value > m_MaxValue )
74 {
76 }
77 else if (value < m_MinValue)
78 {
80 }
81 else
82 {
83 m_Value = value;
84 }
85 //if( GetManager().GetAllowLogs() ) CreateRecord(value, system);
86 }

Перекрестные ссылки m_MaxValue, m_MaxValue, m_MinValue, m_MinValue и m_Value.

Используется в Add() и SetByFloat().

◆ SetByFloat() [1/2]

void SetByFloat ( float value)
private

Используется в SetByFloatEx().

◆ SetByFloat() [2/2]

void SetByFloat ( float value,
string system = "" )
inlineprotected
89 {
90 T f = value;
91 Set(f,system);
92
93 }

Перекрестные ссылки Set().

◆ SetByFloatEx() [1/2]

void SetByFloatEx ( float value,
string system = "" )
private

◆ SetByFloatEx() [2/2]

override void SetByFloatEx ( float value,
string system = "" )
inlineprotected
95 {
97 }
void SetByFloat(float value)

Перекрестные ссылки SetByFloat().

Поля

◆ m_Flags

int m_Flags
protected

◆ m_Manager

PlayerStats m_Manager
protected

Используется в GetManager().

◆ m_MaxValue

T m_MaxValue
protected

Используется в GetMax() и Set().

◆ m_MinValue

T m_MinValue
protected

Используется в GetMin() и Set().

◆ m_Records

ref array<PlayerStatRecord> m_Records
protected

Используется в GetRecords().

◆ m_Type

int m_Type
private

Используется в GetType().

◆ m_Value

T m_Value
protected

Используется в Get().

◆ m_ValueLabel

string m_ValueLabel
protected

Используется в GetLabel().


Объявления и описания членов класса находятся в файле: