3class BleedingIndicator
extends Managed
6 protected bool m_Terminating =
false;
7 protected bool m_EndNow =
false;
36 m_ParentMetaData = parent;
37 m_CurrentDropProbabilityStep = 0;
40 m_DropProbabilityArray = m_ParentMetaData.GetProbabilities(m_Severity);
41 m_DropProbabilityRollsCount = m_DropProbabilityArray.Count();
75 Debug.
Log(
"Unknown severity value!");
87 m_TimeElapsedTotal = 0;
88 m_TimeElapsedSequence = 0;
106 m_Terminating =
true;
112 m_ActiveDropsCount = 0;
115 m_DropSpawnsQueued = 0;
117 m_CurrentDropProbabilityStep = (
int)(m_DropProbabilityRollsCount - (m_DropProbabilityRollsCount / m_AverageFrequency));
123 return m_ActiveDropsCount > 0;
132 data.SetBasePosition(m_BasePosition);
135 m_ActiveDrops.Insert(
data);
136 m_ActiveDropsCount++;
140 m_DropSpawnsQueued--;
145 m_CurrentDropProbabilityStep = 0;
146 m_TimeElapsedSequence = 0;
147 m_DropSpawnsQueued = 0;
152 m_Terminating =
false;
154 m_TimeElapsedTotal = 0;
155 m_CurrentDropProbabilityStep = 0;
156 m_TimeElapsedSequence = 0;
157 m_LastDropSpawnTime = 0;
158 m_DropSpawnsQueued = 0;
177 if (m_TimeElapsedSequence > (m_SequenceTick * m_CurrentDropProbabilityStep))
179 if (m_CurrentDropProbabilityStep < m_DropProbabilityRollsCount)
182 if (
rnd < m_DropProbabilityArray[m_CurrentDropProbabilityStep])
183 m_DropSpawnsQueued++;
185 m_CurrentDropProbabilityStep++;
190 if (m_TimeElapsedSequence > m_SequenceDuration)
192 else if (m_DropSpawnsQueued > 0)
200 m_CurrentDropProbabilityStep++;
215 m_ActiveDrops[
i].StopDrop();
218 m_CleanupQueue.Insert(
i);
222 for (
i = m_CleanupQueue.Count() - 1;
i >= 0;
i--)
224 m_ActiveDrops.Remove(m_CleanupQueue[
i]);
225 m_ActiveDropsCount--;
227 m_CleanupQueue.Clear();
static const float SEQUENCE_DURATION_MEDIUM
static const float SEQUENCE_DROP_AVERAGE_HIGH
static const float SEQUENCE_DROP_DELAY_MAX_HIGH
static const float SEQUENCE_DROP_AVERAGE_MEDIUM
static const float SEQUENCE_DURATION_LOW
static const int INDICATOR_SEVERITY_MEDIUM
static const float SEQUENCE_DROP_DELAY_MAX_MEDIUM
static const float SEQUENCE_DROP_DELAY_MAX_LOW
static const float SEQUENCE_DROP_DELAY_MIN_MEDIUM
static const float SEQUENCE_DROP_AVERAGE_LOW
static const int INDICATOR_SEVERITY_LOW
static const float SEQUENCE_DURATION_HIGH
static const float SEQUENCE_DROP_DELAY_MIN_LOW
static const int INDICATOR_SEVERITY_HIGH
static const float SEQUENCE_DROP_DELAY_MIN_HIGH
Super root of all classes in Enforce script.
static info (non-constants)
static float m_DbgDropMinDelay
static float m_DbgDropMaxDelay
static bool m_DbgUseOverrideValues
static float m_DbgSequenceDuration
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.
ref set< ref BleedingIndicatorDropData > m_ActiveDrops
ref set< int > m_CleanupQueue
GameplayEffectsDataBleeding m_ParentMetaData
int m_CurrentDropProbabilityStep
array< float > m_DropProbabilityArray
bool IsRunningDrops()
Are any drops currently being animated?
void InitIndicator(vector position)
void BleedingIndicator(int source_ID, int severity, GameplayEffectsDataBleeding parent)
float m_LastDropSpawnTime
void StopIndicator(bool instant=false)
float m_TimeElapsedSequence
int m_DropProbabilityRollsCount
void Update(float timeSlice)
float m_DropSpawnMinDelay
float m_DropSpawnMaxDelay
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].