Space Engineers
Public Member Functions | Public Attributes | Protected Attributes | Properties | Events | List of all members
Sandbox.Game.Entities.MyEntityStat Class Reference

Public Member Functions

delegate void StatChangedDelegate (float newValue, float oldValue, object statChangeData)
 
virtual void Init (MyObjectBuilder_Base objectBuilder)
 
virtual MyObjectBuilder_EntityStat GetObjectBuilder ()
 
void ApplyRegenAmountMultiplier (float amountMultiplier=1.0f, float duration=2.0f)
 
void ResetRegenAmountMultiplier ()
 
float GetEfficiencyMultiplier (float multiplier, float threshold)
 
int AddEffect (float amount, float interval, float duration=-1.0f, float minRegenRatio=0.0f, float maxRegenRatio=1.0f)
 
int AddEffect (MyObjectBuilder_EntityStatRegenEffect objectBuilder)
 
virtual void Update ()
 
bool RemoveEffect (int id)
 
void ClearEffects ()
 
bool TryGetEffect (int id, out MyEntityStatRegenEffect outEffect)
 
DictionaryReader< int, MyEntityStatRegenEffectGetEffects ()
 
MyEntityStatRegenEffect GetEffect (int id)
 
override string ToString ()
 
void Increase (float amount, object statChangeData)
 
void Decrease (float amount, object statChangeData)
 
float CalculateRegenLeftForLongestEffect ()
 

Public Attributes

MyEntityStatDefinition StatDefinition = null
 

Protected Attributes

float m_currentValue
 
float m_minValue
 
float m_maxValue
 
float m_defaultValue
 

Properties

float Value [get, set]
 
float CurrentRatio [get]
 
float MinValue [get]
 
float MaxValue [get]
 
float DefaultValue [get]
 
bool ShouldSync [get]
 
float StatRegenLeft [get, set]
 
MyStringHash StatId [get]
 

Events

StatChangedDelegate OnStatChanged
 

Detailed Description

Definition at line 17 of file MyEntityStat.cs.

Member Function Documentation

int Sandbox.Game.Entities.MyEntityStat.AddEffect ( float  amount,
float  interval,
float  duration = -1.0f,
float  minRegenRatio = 0.0f,
float  maxRegenRatio = 1.0f 
)
inline

Definition at line 177 of file MyEntityStat.cs.

int Sandbox.Game.Entities.MyEntityStat.AddEffect ( MyObjectBuilder_EntityStatRegenEffect  objectBuilder)
inline

Definition at line 190 of file MyEntityStat.cs.

void Sandbox.Game.Entities.MyEntityStat.ApplyRegenAmountMultiplier ( float  amountMultiplier = 1.0f,
float  duration = 2.0f 
)
inline

Definition at line 143 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.CalculateRegenLeftForLongestEffect ( )
inline

Definition at line 293 of file MyEntityStat.cs.

void Sandbox.Game.Entities.MyEntityStat.ClearEffects ( )
inline

Definition at line 258 of file MyEntityStat.cs.

void Sandbox.Game.Entities.MyEntityStat.Decrease ( float  amount,
object  statChangeData 
)
inline

Definition at line 291 of file MyEntityStat.cs.

MyEntityStatRegenEffect Sandbox.Game.Entities.MyEntityStat.GetEffect ( int  id)
inline

Definition at line 278 of file MyEntityStat.cs.

DictionaryReader<int, MyEntityStatRegenEffect> Sandbox.Game.Entities.MyEntityStat.GetEffects ( )
inline

Definition at line 273 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.GetEfficiencyMultiplier ( float  multiplier,
float  threshold 
)
inline

Definition at line 172 of file MyEntityStat.cs.

virtual MyObjectBuilder_EntityStat Sandbox.Game.Entities.MyEntityStat.GetObjectBuilder ( )
inlinevirtual

Definition at line 93 of file MyEntityStat.cs.

void Sandbox.Game.Entities.MyEntityStat.Increase ( float  amount,
object  statChangeData 
)
inline

Definition at line 290 of file MyEntityStat.cs.

virtual void Sandbox.Game.Entities.MyEntityStat.Init ( MyObjectBuilder_Base  objectBuilder)
inlinevirtual

Definition at line 57 of file MyEntityStat.cs.

bool Sandbox.Game.Entities.MyEntityStat.RemoveEffect ( int  id)
inline

Definition at line 248 of file MyEntityStat.cs.

void Sandbox.Game.Entities.MyEntityStat.ResetRegenAmountMultiplier ( )
inline

Definition at line 151 of file MyEntityStat.cs.

delegate void Sandbox.Game.Entities.MyEntityStat.StatChangedDelegate ( float  newValue,
float  oldValue,
object  statChangeData 
)
override string Sandbox.Game.Entities.MyEntityStat.ToString ( )
inline

Definition at line 284 of file MyEntityStat.cs.

bool Sandbox.Game.Entities.MyEntityStat.TryGetEffect ( int  id,
out MyEntityStatRegenEffect  outEffect 
)
inline

Definition at line 268 of file MyEntityStat.cs.

virtual void Sandbox.Game.Entities.MyEntityStat.Update ( )
inlinevirtual

Definition at line 207 of file MyEntityStat.cs.

Member Data Documentation

float Sandbox.Game.Entities.MyEntityStat.m_currentValue
protected

Definition at line 19 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.m_defaultValue
protected

Definition at line 30 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.m_maxValue
protected

Definition at line 27 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.m_minValue
protected

Definition at line 24 of file MyEntityStat.cs.

MyEntityStatDefinition Sandbox.Game.Entities.MyEntityStat.StatDefinition = null

Definition at line 55 of file MyEntityStat.cs.

Property Documentation

float Sandbox.Game.Entities.MyEntityStat.CurrentRatio
get

Definition at line 22 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.DefaultValue
get

Definition at line 31 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.MaxValue
get

Definition at line 28 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.MinValue
get

Definition at line 25 of file MyEntityStat.cs.

bool Sandbox.Game.Entities.MyEntityStat.ShouldSync
get

Definition at line 34 of file MyEntityStat.cs.

MyStringHash Sandbox.Game.Entities.MyEntityStat.StatId
get

Definition at line 50 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.StatRegenLeft
getset

Definition at line 41 of file MyEntityStat.cs.

float Sandbox.Game.Entities.MyEntityStat.Value
getset

Definition at line 21 of file MyEntityStat.cs.

Event Documentation

StatChangedDelegate Sandbox.Game.Entities.MyEntityStat.OnStatChanged

Definition at line 53 of file MyEntityStat.cs.


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