52 RegisterLayouts(
"gui/layouts/gameplay/BleedingEffects.layout",{EffectWidgetsTypes.BLEEDING_LAYER});
58 InitWidgetSet(EffectWidgetsTypes.MASK_OCCLUDER,
false,EffectWidgetsTypes.MASK_OCCLUDER);
62 InitWidgetSet(EffectWidgetsTypes.NVG_OCCLUDER,
false,EffectWidgetsTypes.NVG_OCCLUDER);
63 InitWidgetSet(EffectWidgetsTypes.PUMPKIN_OCCLUDER,
false,EffectWidgetsTypes.NVG_OCCLUDER);
75 for (
int i = 0; i <
m_Layouts.Count(); i++)
91 foreach (
int i : types)
99 m_IDToTypeMap.Insert(EffectWidgetsTypes.BLEEDING_LAYER,GameplayEffectsDataBleeding);
125 protected void InitWidgetSet(
int type,
bool updating =
false,
int user_id_override = -1)
128 if (user_id_override != -1)
130 parent =
m_Layouts.Get(type).FindAnyWidgetById(user_id_override);
134 parent =
m_Layouts.Get(type).FindAnyWidgetById(type);
139 Print(
"InitWidgetSet | type: " + type +
" - parent not found!");
144 Widget w = parent.GetChildren();
157 if (parent.GetChildren())
166 if (ImageWidget.Cast(parent.GetChildren()))
198 ret.Insert(EffectWidgetsTypes.MASK_OCCLUDER);
199 ret.Insert(EffectWidgetsTypes.MASK_BREATH);
200 ret.Insert(EffectWidgetsTypes.HELMET_OCCLUDER);
201 ret.Insert(EffectWidgetsTypes.HELMET_BREATH);
202 ret.Insert(EffectWidgetsTypes.MOTO_OCCLUDER);
203 ret.Insert(EffectWidgetsTypes.MOTO_BREATH);
204 ret.Insert(EffectWidgetsTypes.COVER_FLASHBANG);
205 ret.Insert(EffectWidgetsTypes.NVG_OCCLUDER);
206 ret.Insert(EffectWidgetsTypes.PUMPKIN_OCCLUDER);
207 ret.Insert(EffectWidgetsTypes.EYEPATCH_OCCLUDER);
208 ret.Insert(EffectWidgetsTypes.HELMET2_OCCLUDER);
219 bool runningEffectsPresent = runningEffectCount > 0;
238 w.GetParent().Show(
false);
244 if (runningEffectsPresent)
247 for (i = 0; i < runningEffectCount; i++)
253 dta.m_LayoutRoot.Show(
true);
283 if (effects && effects.Count() > 0)
288 for (
int i = 0; i < effects.Count(); i++)
290 value = effects.Get(i);
303 if (effects && effects.Count() > 0)
309 for (
int i = 0; i < effects.Count(); i++)
311 value = effects.Get(i);
334 for (
int i = 0; i < count; i++)
384 if (type == EffectWidgetsTypes.ROOT)
390 int type_widgetset = 0;
401 dta.
Update(timeSlice,p,handle);
406 widget_set = dta.GetWidgetSet();
407 foreach (
Widget w : widget_set)
427 dta.
Update(timeSlice,p,handle);
432 widget_set = dta.GetWidgetSet();
433 foreach (
Widget w2 : widget_set)
460 case EffectWidgetsTypes.MOTO_BREATH:
461 case EffectWidgetsTypes.HELMET_BREATH:
462 case EffectWidgetsTypes.MASK_BREATH:
468 case EffectWidgetsTypes.MOTO_OCCLUDER:
469 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
470 case EffectWidgetsTypes.HELMET_OCCLUDER:
471 case EffectWidgetsTypes.HELMET2_OCCLUDER:
472 case EffectWidgetsTypes.MASK_OCCLUDER:
478 case EffectWidgetsTypes.COVER_FLASHBANG:
496 case EffectWidgetsTypes.MOTO_BREATH:
497 case EffectWidgetsTypes.HELMET_BREATH:
498 case EffectWidgetsTypes.MASK_BREATH:
504 case EffectWidgetsTypes.MOTO_OCCLUDER:
505 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
506 case EffectWidgetsTypes.HELMET_OCCLUDER:
507 case EffectWidgetsTypes.HELMET2_OCCLUDER:
508 case EffectWidgetsTypes.MASK_OCCLUDER:
514 case EffectWidgetsTypes.COVER_FLASHBANG:
540 float speed = timeSlice * modifier;
578 Param1<float> par = Param1<float>.Cast(p);
602 Param1<float> par = Param1<float>.Cast(p);
605 float alpha_mod =
Math.
Clamp(par.param1,0.0,1.0);
607 m_Root.SetAlpha(alpha_mod);
proto native WorkspaceWidget GetWorkspace()
override bool DataInitialized()
override void Init(array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
override void ForceStop()
stops and re-sets indicators and images even out of sequence. Should still be tied to the 'player' up...
override void Update(float timeSlice=0, Param p=null, int handle=-1)
override void UpdateVisibility(bool state)
override bool HasDefinedHandle()
Manages all bleeding indicators and their updates.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
proto native float GetSceneHDRMul(int camera)
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.