30 m_WidgetArray.ShuffleArray();
31 m_ImageWidgetCount = m_WidgetArray.Count();
36 m_LastPositionFrameUsed = -1;
59 ErrorEx(
"" +
this +
" is already initialized, further registration not possible!");
61 Debug.
Log(
"ERROR: " +
this +
" is already initialized, further registration not possible!");
70 if (
par.param1 ==
true)
89 if (m_RunningIndicators.Find(
source_ID) != -1)
116 if (m_LastDropIdx > (m_ImageWidgetCount - 1))
119 return ImageWidget.Cast(m_WidgetArray[m_LastDropIdx]);
129 BleedingIndicator
bib;
130 for (
int i = 0;
i < m_RunningIndicators.Count();
i++)
132 bib = m_RegisteredInstances.Get(m_RunningIndicators[
i]);
135 m_CleanupQueue.Insert(m_RunningIndicators[
i]);
141 for (
int i = 0;
i < m_CleanupQueue.Count();
i++)
142 m_RunningIndicators.RemoveItem(m_CleanupQueue[
i]);
143 m_CleanupQueue.Clear();
178 if (m_RunningIndicators.Count() <= 0)
181 m_WidgetArray.ShuffleArray();
203 m_RegisteredInstances.Get(
i).StopIndicator(
true);
209 if (!m_ProbabilityMap)
224 ErrorEx(
"No defined data for the selected severity!");
233 if (!m_PositioningFramesArray)
239 m_PositioningFramesArray.Insert(
frame);
247 if (m_PositioningFramesArray)
249 int arrayCount = m_PositioningFramesArray.Count();
251 if (
index == m_LastPositionFrameUsed)
259 m_LastPositionFrameUsed =
index;
static const int SEQUENCE_STEPS
static const float SEQUENCE_DROP_AVERAGE_HIGH
static const float SEQUENCE_DROP_AVERAGE_MEDIUM
static const int INDICATOR_SEVERITY_MEDIUM
static const float SEQUENCE_DROP_AVERAGE_LOW
static const int INDICATOR_SEVERITY_LOW
static const int INDICATOR_SEVERITY_HIGH
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Manages all bleeding indicators and their updates.
override bool DataInitialized()
override void Init(array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
ref map< int, ref BleedingIndicator > m_RegisteredInstances
override void ForceStop()
stops and re-sets indicators and images even out of sequence. Should still be tied to the 'player' up...
ref array< int > m_CleanupQueue
ImageWidget GetNextDropImage()
override void RegisterData(Param p)
ref array< Widget > m_PositioningFramesArray
void CleanupBleedingIndicators()
void SpawnBleedingIndicator(int source_ID, vector position)
array< float > GetProbabilities(int severity)
override void Update(float timeSlice=0, Param p=null, int handle=-1)
vector GenerateSequenceRandomPosition()
void BuildProbabilityData(int severity, float frequency)
int CalculateSeverity(float flow_modifier)
override void UpdateVisibility(bool state)
ref array< int > m_RunningIndicators
void GameplayEffectsDataBleeding(array< ref Widget > input, int type, int user_override=-1)
ref map< int, ref array< float > > m_ProbabilityMap
void BuildPositioningData()
override bool HasDefinedHandle()
int m_LastPositionFrameUsed
void StopBleedingIndicator(int source_ID, bool instant=false)
void UpdateBleedingIndicators(float timeSlice)
void RegisterBleedingIndicatorInstance(int bit, float flow_modifier)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
static const float BLEEDING_SOURCE_FLOW_MODIFIER_LOW
static const float BLEEDING_SOURCE_FLOW_MODIFIER_HIGH
static const float BLEEDING_SOURCE_FLOW_MODIFIER_MEDIUM
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static float Poisson(float mean, int occurences)
occurences values above '12' will cause Factorial to overflow int.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].